Naming Suggestions For A Function Providing Chaining In A Different Way

Posted by sid3k on Stack Overflow See other posts from Stack Overflow or by sid3k
Published on 2010-05-20T01:51:58Z Indexed on 2010/05/20 2:20 UTC
Read the original article Hit count: 335

I've coded an experimental function which makes passed objects chainable by using high order functions. It's name is "chain" for now, and here is a usage example;

chain("Hello World")
  (print) // evaluates print function by passing "Hello World" object.
  (console.log,"Optional","Parameters")
  (returnfrom) // returns "Hello World"

It looks lispy but behaves very different since it's coded in a C based language, I don't know if there is a name for this idiom and I couldn't any name more suitable than "chain".

Any ideas, suggestions?

© Stack Overflow or respective owner

Related posts about naming

Related posts about functional-programming