Rust: // This function accepts any two functions and composes them into a single function accepting the // input type for the first function and returning the output type of the second function. fn compose<'f, T1, T2, T3, F1, F2>(a: F1, b: F2) -> Box<Fn(T1) -> T3 + 'f> where F1: Fn(T1) -> T2 + 'f, F2: Fn(T2) -> T3 + 'f { box move |input| b(a(input)) }
Haskell: compose f g x = f (g x)
Scheme: (define (compose f g) (lambda (x) (f (g x))))
Name:
Anonymous2015-07-17 13:17
Symta: compose F G = X => F (G X)
Name:
Anonymous2015-07-17 14:51
Rust is the only choice in these, since it's the only one that don't have GC.
>>5 complaining about forcing these ``retarded memes'' when there's some retard around throwing >meme arrows, plebs, cucks and shills shows how much of a dumbfuck you are
>>6 you're one of those jp shits who is so autistic they can't cope with someone using > in a way you don't prescribe. absolutely pathetic.
Name:
Anonymous2015-07-17 16:32
Agda: _○_ : {A : Set} {B : A -> Set} {C : (x : A) -> B x -> Set} (f : {x : A} (y : B x) -> C x y) (g : (x : A) -> B x) (x : A) -> C x (g x) (f ○ g) x = f (g x)
>>18 You've got to be ugly to be popular in the compiled languages arena. You want ~zero cost abstractions? You got hideous languages like Rust and C++. Even Java and C# are disgusting.