6 kyu

Unary function chainer

2,759 of 7,261tpatja

Description:

Your task is to write a higher order function for chaining together a list of unary functions. In other words, it should return a function that does a left fold on the given functions.

chained([a,b,c,d])(input)

Should yield the same result as

d(c(b(a(input))))
Functional Programming
Fundamentals

More By Author:

Check out these other kata created by tpatja

Stats:

CreatedJan 29, 2015
PublishedJan 29, 2015
Warriors Trained24199
Total Skips7779
Total Code Submissions27821
Total Times Completed7261
Python Completions2759
JavaScript Completions4550
OCaml Completions16
Total Stars493
% of votes with a positive feedback rating94% of 908
Total "Very Satisfied" Votes809
Total "Somewhat Satisfied" Votes84
Total "Not Satisfied" Votes15
Ad
Contributors
  • tpatja Avatar
  • jhoffner Avatar
  • FArekkusu Avatar
  • user9644768 Avatar
  • trashy_incel Avatar
  • sid114 Avatar
Ad