Sha256: 42641a65d0e71ed1c151e3d09e532dd8c0a98f02f32fed6ab09658935bda74ae
Contents?: true
Size: 463 Bytes
Versions: 242
Compression:
Stored size: 463 Bytes
Contents
module Etl ( transform ) where import Prelude import Data.Array (foldl) import Data.Char (toLower) import Data.Map (Map, insert, empty, toUnfoldable) import Data.Tuple (Tuple(..)) transform :: Map Int (Array Char) -> Map Char Int transform = toUnfoldable >>> expand >>> foldl add empty where expand xs = do Tuple k ys <- xs y <- ys pure $ Tuple k y add m (Tuple k v) = insert (toLower v) k m
Version data entries
242 entries across 242 versions & 1 rubygems