3 ms·
This particular example can be encoded into the Haskell type system though. For example, there's a tensor library where all operations are (according to the des
by grumdan 7y ago
This particular example can be encoded into the Haskell type system though. For example, there's a tensor library where all operations are (according to the description) checked for the correct dimensions by the type system. It seems to require a lot of type-level magic though, and that may disqualify it for "cleanly".
http://hackage.haskell.org/package/easytensor http://hackage.haskell.org/package/easytensor