dowould kind of behave like a List monad @jolod ?
x <- Array.fromFoldable xs.)
module SetMonad import Data.SortedSet (>>=) : (Ord a, Ord b) => SortedSet a -> (a -> SortedSet b) -> SortedSet b (>>=) xs fn = foldr (\elem, accu => union (fn elem) accu) empty xs pure : Ord a => a -> SortedSet a pure a = fromList [a] shenaningans : SortedSet Int shenaningans = do a <- fromList [1,2,3] b <- fromList [1,2,3] pure (a * b) result : List Int result = Data.SortedSet.toList shenaningans
dohas lazy semantics)
The claim is simple: in a static type system, you must declare the shape of data ahead of time, but in a dynamic type system, the type can be, well, dynamic! It sounds self-evident, so much so that Rich Hickey has practically built a speaking career upon its emotional appeal. The only problem is it isn’t true.