Closed emil14 closed 3 weeks ago
Perhaps more type safe version
interface IIfHandler<T, Y, U>(data T) (then Y, else U)
interface IThenHandler<T, Y>(data T) (res Y)
interface IElseHandler<T, Y>(data T) (res Y)
flow Condition<T, Y, U, I, O>(data T) (then I, else O) {
nodes {
if IIfHandler<T, Y, U>
then IThenElseHandler<Y, I>
else IElseHandler<U, O>
}
:data -> if
if:then -> then -> :then
if:else -> else -> :else
}
probably collide with #727
will close for now, looks like we have better ideas about if and ternary at the moment
Naive implementation and example