flux
flux copied to clipboard
Error with arrays and anonymous functions in repl
Consider this repl log:
> ((x) => (y) => [x, y][0])(x: (i) => i)(y: (i) => i)(i: 2)
Error: error calling function "<anonymous function>": error calling function "<anonymous function>": expecting array type
> ((x) => (y) => [x, y][1])(x: (i) => i)(y: (i) => i)(i: 2)
Error: error calling function "<anonymous function>": error calling function "<anonymous function>": expecting array type
> ((x) => (y) => x)(x: (i) => i)(y: (i) => i)(i: 2)
2
> ((x) => (y) => y)(x: (i) => i)(y: (i) => i)(i: 2)
2
> ((x, y) => [x,y][0])(x: (i) => i, y: (i) => i)(i: 2)
2
> ((x, y) => [x,y][1])(x: (i) => i, y: (i) => i)(i: 2)
2
An interesting thing to note is that it appears to only happen with the curried form.
This issue has had no recent activity and will be closed soon.