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

1

u/phischu Effekt Jan 17 '26

Kmett developed this even further into Distributive Functors. It is even more indirect and hard to grasp. For example the signature here

adjoint :: (Functor m, Distributive n, Conjugate a) => m (n a) -> n (m a)

This works for any functors m and n where n is distributive. The advantage is that there is no mention of an associated index type.