The functional-programming tag has no wiki summary.
4
votes
5answers
150 views
Write biSp in point-free form using as few terms as possible
The Haskell function biSp has type signature
biSp :: (a -> c) -> (b -> d) -> (c -> d -> e) -> a -> b -> e
and (for those who prefer combinator calculus) can be defined as
...
12
votes
2answers
855 views
Shortest a -> b -> (a -> b) function in Haskell
I got this question at a test:
Write a function f with the following type a -> b -> (a -> b). a and b should not be bound in any sense, the shorter the code, the better.
I came up with ...
0
votes
3answers
155 views
Permutable functions [closed]
In your favourite programming language, write two functions f and g such as f(g) gives the same (not trivial) result as g(f), but f and g are different (signifiant changes, not only trivial ...
5
votes
11answers
316 views
Write a function that reduces compositions of linear operators
You are given two functions g(x) and h(x), each of which takes an integer x and returns the number ax + b (where a and b are integers defined in the function).
Your task is to write a function f(g, ...