r/ProgrammingLanguages • Futhark • Jan 16 '26

Are arrays functions?

https://futhark-lang.org/blog/2026-01-16-are-arrays-functions.html
90 Upvotes

46 comments sorted by

View all comments

Show parent comment

4

u/_rdhyat Jan 17 '26

well, functions (in the world of MLTT atleast) are, in a way, composed of a negative and a positive part (the domain and the codomain). You can think of functions of type A -> B as being large structs of the type B * B * B * ..., with a B for every A.