0 Replies - 1024 Views - Last Post: 26 September 2009 - 09:26 AM

#1 Jaakuuta  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 163
  • Joined: 02-July 09

[Scheme] Fork Combinator

Posted 26 September 2009 - 09:26 AM

Description: This combinator can be used to combine the results of two different function applications or compositions.This combinator takes three functions. The first function takes two arguments, and the second and third functions each take one argument. This combinator then generates a new function that applies the first function to the result of the application of the second and third function on the following argument.
(define fork
  (lambda (f g h)
    (lambda (x)
      (f (g x) (h x)))))


Is This A Good Question/Topic? 0
  • +

Page 1 of 1