() Marek Kubica <ma...@xivilization.net>
() Thu, 2 Dec 2010 05:45:56 +0100

   Before I reinvent the wheel, does Guile have support for
   something similar to Racket's curry/curryr or Pythons
   functools.partial, which returns me a lambda with some
   arguments already pre-set?

If you mean:

  (define ((foo x) y)
    (+ x y))
  
  ===
  
  (define (foo x)
    (lambda (y)
      (+ x y)))

with usage, e.g.:

  (map (foo 1) (iota 3))
  => (1 2 3)

then, yes, prior to Guile 1.9, this was supported out of the box.
With 1.9 and later you must:

  (use-modules (ice-9 curried-definitions))

first.  I wonder if there is a way to autoload that module, to
achieve the pre-1.9 (out of the box) behavior.

Reply via email to