# Puzzler that crushed my production

**URL:** <https://discuss.kotlinlang.org/t/puzzler-that-crushed-my-production/3845>\
**Category:** Uncategorized\
**Created:** [July 22, 2017, 11:29pm UTC](https://discuss.kotlinlang.org/t/puzzler-that-crushed-my-production/3845 "2017-07-22T23:29:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![terehovks3](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@terehovks3](https://discuss.kotlinlang.org/u/terehovks3)\
**Post date:** [July 22, 2017, 11:29pm UTC](https://discuss.kotlinlang.org/t/puzzler-that-crushed-my-production/3845/1 "2017-07-22T23:29:26Z")

</div>

```
private fun foo(one: (String) -> Unit = {}, two: (String) -> Unit = {}) {
    one("one")
    two("two")
}

fun main(args: Array<String>) {
    foo({ print(it) })
    foo { print(it) } 
}

```

I think should be inspection about it.

---

<div class="post-metadata">

**Author:** ![terehovks3](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@terehovks3](https://discuss.kotlinlang.org/u/terehovks3)\
**Post date:** [July 22, 2017, 11:34pm UTC](https://discuss.kotlinlang.org/t/puzzler-that-crushed-my-production/3845/2 "2017-07-22T23:34:40Z")

</div>

But I can’t realize in in which case…

---

<div class="post-metadata">

**Author:** ![tieskedh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/tieskedh/32/2816_2.png) [@tieskedh](https://discuss.kotlinlang.org/u/tieskedh)\
**Post date:** [July 23, 2017, 3:12pm UTC](https://discuss.kotlinlang.org/t/puzzler-that-crushed-my-production/3845/3 "2017-07-23T15:12:25Z")

</div>

> **Facts to solve**
>
> - When the last parameter is a lambda, it can be passed in curly brackets.
> - Function parameters will be implemented from the beginning (arguments can only be skipped when they are named).

If there needs to be an inspection, I think the case is:

- The method:

- The function call:

---

<div class="post-metadata">

**Author:** ![elizarov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/elizarov/32/2164_2.png) [@elizarov](https://discuss.kotlinlang.org/u/elizarov)\
**Post date:** [July 24, 2017, 6:20pm UTC](https://discuss.kotlinlang.org/t/puzzler-that-crushed-my-production/3845/4 "2017-07-24T18:20:41Z")

</div>

You should file an issue with this example to [http://kotl.in/issue](http://kotl.in/issue) anyway
