|
From: | Panicz Maciej Godek |
Subject: | Re: Shorter lambda expressions |
Date: | Sat, 24 Sep 2016 11:38:28 +0200 |
I believe that -- since it is just a function -- it is much less controversial than both the short macros and SRFI-26 (although its range of applicability is narrower), and it seems to compose well with the spirit of Scheme, so maybe that would be a nice-have?(map (partial cons 2) '((3 4) (3 5) (4 6) (7 1)))and it works rather nicely:(apply function `(,@args ,@args+)))(define ((partial function . args) . args+)With guile's curried definitions, it can be defined asI hope you don't mind me having dug this thread up, with an idea that is only loosely related with the original one.Recently I've been doing a small project in Clojure, and I've found that it provides a function called "partial" that performs a sort of partial application.
===> ((2 3 4) (2 3 5) (2 4 6) (2 7 1))
[Prev in Thread] | Current Thread | [Next in Thread] |