AZ
subsample k arr = (groupsOf k arr) |> map List.head
Size: a a a
AZ
subsample k arr = (groupsOf k arr) |> map List.head
SP
subsample :: Int -> [a] -> [a]
subsample k arr = map List.head . groupsOf k
AZ
SP
map (List.head . groupsOf) k
SP
(|>) :: a -> (a -> b) -> b
(|>) x f = f x
infixl 0 |>
AZ
subsample k arr = List.head <$> groupsOf k arr
AZ
SP
AZ
SP
AZ
AZ
subsample = ((Listhead <$>) .) . groupsOf
SP
AZ
AZ
AZ
SP
AZ
AZ
p