#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    81
    Rep Power
    12

    defining two functions in terms of oneanother


    A brain-twister: How does one define these two functions of one another? Any ideas?
    (define first (lambda (q w e) (q (w e))))
    (define second(lambda (q w)(lambda (e) (q (w e)))))
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Lisp? What exactly do the two functions do? then maybe i can recreate them...

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Houston, TX
    Posts
    383
    Rep Power
    13
    Code:
    def first(q, w, e):
        return q(w, e)
    
    def second(q, w):
        return (lambda e: q(w, e))

IMN logo majestic logo threadwatch logo seochat tools logo