# Many of Spring Reactor's APIs are not written in Kotlin

**URL:** https://discuss.kotlinlang.org/t/many-of-spring-reactors-apis-are-not-written-in-kotlin/5462
**Category:** Support
**Created:** [November 18, 2017, 3:30am UTC](https://discuss.kotlinlang.org/t/many-of-spring-reactors-apis-are-not-written-in-kotlin/5462 "2017-11-18T03:30:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![SuperPDX](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@SuperPDX](https://discuss.kotlinlang.org/u/SuperPDX)
#### Post date: [November 18, 2017, 3:30am UTC](https://discuss.kotlinlang.org/t/many-of-spring-reactors-apis-are-not-written-in-kotlin/5462/1 "2017-11-18T03:30:25Z")

</div>

When I was writing Spring Reactor with Kotlin, many APIs did not know how to write it.

for example：

Java:

Flux.just(“a”, “b”)  
.zipWith(Flux.just(“c”, “d”), (s1, s2) → String.format(“%s-%s”, s1, s2))  
.subscribe(System.out::println);

---

<div class="post-metadata">

### Author: ![medium](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/medium/32/10404_2.png) [@medium](https://discuss.kotlinlang.org/u/medium)
#### Post date: [November 18, 2017, 12:39pm UTC](https://discuss.kotlinlang.org/t/many-of-spring-reactors-apis-are-not-written-in-kotlin/5462/2 "2017-11-18T12:39:30Z")

</div>

And what is your question?

---

<div class="post-metadata">

### Author: ![ilya.gorbunov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ilya.gorbunov/32/1645_2.png) [@ilya.gorbunov](https://discuss.kotlinlang.org/u/ilya.gorbunov)
#### Post date: [November 19, 2017, 4:36am UTC](https://discuss.kotlinlang.org/t/many-of-spring-reactors-apis-are-not-written-in-kotlin/5462/3 "2017-11-19T04:36:53Z")

</div>

I suppose the question is about the lack of examples in Kotlin.  
That is actually easy to solve – just paste the Java example in Kotlin code and IDEA will propose to convert it to Kotlin automatically.

---

<div class="post-metadata">

### Author: ![medium](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/medium/32/10404_2.png) [@medium](https://discuss.kotlinlang.org/u/medium)
#### Post date: [November 19, 2017, 9:21am UTC](https://discuss.kotlinlang.org/t/many-of-spring-reactors-apis-are-not-written-in-kotlin/5462/4 "2017-11-19T09:21:02Z")

</div>

The API for Java and Kotlin is basically the same. The main difference it the syntax for lambda expressions. And there are some Kotlin specific factory functions to create a `Flux` or `Mono` in the form of extension functions. This is described in the [Reactor Reference](http://projectreactor.io/docs/core/release/reference/#kotlin).
