We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Filter Array
Filter Array
Sort by
recency
|
149 Discussions
|
Please Login in order to post a comment
You are expected to write a custom filter function without using built-in methods. Just return a new list with elements less than the delimiter while preserving order. Make sure your function matches the given signature for your language.
The generate code by HR is bad. Haskell is a functional programming language and it should be a declarative style rather than imperative.
for example this processes whole input like a stream. Betpkr Much more elegant.
filterIt :: [Int] -> [String] filterIt (a:xs) = map show $ filter (\x -> x < a) xs
main = interact $ unlines . filterIt. map read. words
F#
Scala
Thanks for the solution, https://www.lightweightflanges.com/ I was looking for it for my site