3 ms·
http://hackage.haskell.org/package/base-4.6.0.1/docs/Prelude.html#v:divMod http://hackage.haskell.org/package/base-4.6.0.1/docs/Prelude... It's exactly like th
by lelf 13y ago
http://hackage.haskell.org/package/base-4.6.0.1/docs/Prelude.html#v:divMod http://hackage.haskell.org/package/base-4.6.0.1/docs/Prelude...
It's exactly like that in Haskell. If it makes sense to return 2 values — return tuple. Works really well with pattern matching. Syntactic overhead = 0.
- mturmon 13y agoYes. I first saw the idiom in Matlab, actually.