Re: Shorter lambda expressions

2016-09-24 Thread Panicz Maciej Godek
2016-09-23 18:44 GMT+02:00 Panicz Maciej Godek : > I 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 perf

Re: Shorter lambda expressions

2016-09-23 Thread Panicz Maciej Godek
I 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. With guile's curried d

Re: Shorter lambda expressions

2014-01-24 Thread Eli Barzilay
> One related thing I sometimes lack is: >=20 > (define-syntax-rule (thunk exp ...) > (lambda () exp ...)) >=20 > (Found in Racket, notably.) IMO, it's much more useful to have `λ', together with an Emacs hack that makes it easy to type. In the last few years I even switched to omitting the

Re: Shorter lambda expressions

2014-01-24 Thread Mark H Weaver
taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes: > l...@gnu.org (Ludovic Courtès) writes: > >> One related thing I sometimes lack is: >> >> (define-syntax-rule (thunk exp ...) >> (lambda () exp ...)) > > My understanding is that that'd be (^ exp ...). That's true given the c

Re: Shorter lambda expressions

2014-01-24 Thread Taylan Ulrich Bayırlı/Kammer
l...@gnu.org (Ludovic Courtès) writes: > One related thing I sometimes lack is: > > (define-syntax-rule (thunk exp ...) > (lambda () exp ...)) My understanding is that that'd be (^ exp ...). `thunk' might be nicer for one's tastes, but some consistency between different people's code would

Re: Shorter lambda expressions

2014-01-24 Thread Ludovic Courtès
Panicz Maciej Godek skribis: > I think it would be best to extend SRFI-26 with the option of using > <1>, <2>, ... placeholders, where the resulting lambda would get the > arity indicated by the highest placeholder. Also, it should support > nested expressions. > Personally, I'd prefer it over th

Re: Shorter lambda expressions

2014-01-23 Thread Panicz Maciej Godek
Hi! 2014/1/23 Mark H Weaver : > Hello all, > > For a short time I liked 'cut' from SRFI-26, but I soon became > frustrated by its limitations, most notably not being able to reference > the arguments out of order or within nested expressions. I don't like > the inconsistent style that results whe

Re: Shorter lambda expressions

2014-01-22 Thread Mateusz Kowalczyk
On 23/01/14 04:51, Mark H Weaver wrote: > Hello all, > > For a short time I liked 'cut' from SRFI-26, but I soon became > frustrated by its limitations, most notably not being able to reference > the arguments out of order or within nested expressions. I don't like > the inconsistent style that r

Shorter lambda expressions

2014-01-22 Thread Mark H Weaver
Hello all, For a short time I liked 'cut' from SRFI-26, but I soon became frustrated by its limitations, most notably not being able to reference the arguments out of order or within nested expressions. I don't like the inconsistent style that results when I use 'cut' wherever possible and 'lambd