# Lambdas

## Lambda Syntax

```fsharp
lambda <ReturnType> (Parameters) {
    <lambda body>
}
```

For syntax of `Parameters` - [#common-placeholders-throughout-documentation](../read-before-proceeding#common-placeholders-throughout-documentation "mention")

## Working Example

{% tabs %}
{% tab title="Gauntlet" %}
```fsharp
package main

import "fmt" as fmt


fun main(): Unit {
  let myLambda = lambda (caps: Bool): String {
    if caps {
      return "HELLO"
    }
    else {
      return "Hello"
    }
    
  }
  fmt.println(myLambda(true))
}
```
{% endtab %}

{% tab title="Transpiled" %}
```go
package main

import fmt "fmt"

func main() {
	myLambda := func(caps bool) string {
		if caps {

			return "HELLO"
		} else {

			return "Hello"
		}
	}
	fmt.Println(myLambda(true))
	// Eliminates any 'unused variable' errors
	_ = myLambda

}

```
{% endtab %}

{% tab title="Output" %}
```
HELLO
```
{% endtab %}
{% endtabs %}

