how would I go about implementing this
# getting-started
o
how would I go about implementing this
v
Could you elaborate more? What types? What is the result? How will it be used?
o
ah sorry, well I mean to say that I want to be able to type
add x y
where X and Y are Ints, and have it return something
instead of doing
val value = x + y
I want to be able to say
val value = add x y
v
polish notation? think it cannot be done
add(x y)
is the closes thing
Kotlin is not a hipster language, right? 😉
o
we’ll see about that
b
If
prefix fun
was a thing in Kotlin, it could be done like this: https://try.kotlinlang.org/#/UserProjects/9qjpi8grs7ciip44h2lovsjva5/8hs12fa3iv6f4hh826rooee5eb
o
I see, well that’s how I imagined it too…
ok thanks for trying
I think I meant something else and I’m not aware of it