On Tue, May 17, 2011 at 3:14 PM, Sam Tobin-Hochstadt
wrote:
> Lots of people have written similar things (`cut' in SRFI 26, Jay's
> `super-cut', etc), but I'd like to move towards using it implicitly.
I use (require (rename-in srfi/26 [cut //])) and that's simple enough for
me. I find the implici
Two hours ago, Matthias Felleisen wrote:
>
> I second Eli on a second level.
>
> As much as I think that syntactic simplicity helps a lot of languages,
> I don't think this particular kind of simplicity is a major problem or
> even worth our attention.
>
> For a while I decided to try point-
Robby Findler wrote:
On Tue, May 17, 2011 at 9:52 PM, Matthias Felleisen
wrote:
For a while I decided to try point-free programming. You can do it in
Racket as well as in Haskell. Then I ran across someone's rules for
writing Scheme and he had written
(lambda (n) (+ x n))
is just as readable
On Tue, May 17, 2011 at 9:52 PM, Matthias Felleisen
wrote:
> For a while I decided to try point-free programming. You can do it in
> Racket as well as in Haskell. Then I ran across someone's rules for
> writing Scheme and he had written
>
> (lambda (n) (+ x n))
>
> is just as readable if not more
I second Eli on a second level.
As much as I think that syntactic simplicity helps a lot of languages,
I don't think this particular kind of simplicity is a major problem or
even worth our attention.
For a while I decided to try point-free programming. You can do it in
Racket as well as in
On 2011-05-17 7:38 PM, Eli Barzilay wrote:
This is relevant here, since your extension leads to another layer
of headaches.
Does this make it into more of a #lang mixin, as was recently discussed
in the context of "#lang testable racket" in Another Place?
Tony
___
Four hours ago, Sam Tobin-Hochstadt wrote:
> I prefer this over `scut' for two reasons. (1) It makes the simple
> cases simpler: you don't have to name anything. (2) It doesn't try
> to handle the more complicated cases, which I think is a good thing.
> Things that are implicit should either alwa
I prefer this over `scut' for two reasons. (1) It makes the simple
cases simpler: you don't have to name anything. (2) It doesn't try to
handle the more complicated cases, which I think is a good thing.
Things that are implicit should either always do the right thing, or
just do something simple.
If you forget how to find super-cut:
https://github.com/jeapostrophe/exp/blob/master/scut.ss
2011/5/17 Jay McCarthy :
> Obviously, I prefer super-cut, but this is still cute. :)
>
> Jay
>
> 2011/5/17 Sam Tobin-Hochstadt :
>> Scala has the nice feature that if you write something like this:
>> ls
Obviously, I prefer super-cut, but this is still cute. :)
Jay
2011/5/17 Sam Tobin-Hochstadt :
> Scala has the nice feature that if you write something like this:
> lst.map(_ - 1)
> It automatically rewrites to a function like this:
> lst.map(x => x - 1)
> This makes writing some higher-order fu
On Tue, May 17, 2011 at 3:21 PM, Robby Findler
wrote:
> What is the rule for where the lambda goes?
If you have an application with one (or more) occurences of `_' as
immediate subforms, then that application is rewritten into (lambda
args the-original-application).
It doesn't attempt to do a de
On Tue, May 17, 2011 at 3:20 PM, John Clements
wrote:
>
> On May 17, 2011, at 12:14 PM, Sam Tobin-Hochstadt wrote:
>
>> Scala has the nice feature that if you write something like this:
>> lst.map(_ - 1)
>> It automatically rewrites to a function like this:
>> lst.map(x => x - 1)
>> This makes w
But then this:
(map (+ 1 _) (list 1 2 3))
would turn into
(lambda (_) (map (+ 1 _) (list 1 2 3))
no?
Robby
On Tue, May 17, 2011 at 2:22 PM, John Clements
wrote:
>
> On May 17, 2011, at 12:21 PM, Robby Findler wrote:
>
>> What is the rule for where the lambda goes?
>
> Looks to me like it go
On May 17, 2011, at 12:21 PM, Robby Findler wrote:
> What is the rule for where the lambda goes?
Looks to me like it goes at the outside. So the macro plows through the terms
and when it gets to the bottom, it decides either to wrap the whole thing in a
lambda or not.
John
>
> Robby
>
> O
What is the rule for where the lambda goes?
Robby
On Tue, May 17, 2011 at 2:14 PM, Sam Tobin-Hochstadt wrote:
> Scala has the nice feature that if you write something like this:
> lst.map(_ - 1)
> It automatically rewrites to a function like this:
> lst.map(x => x - 1)
> This makes writing som
On May 17, 2011, at 12:14 PM, Sam Tobin-Hochstadt wrote:
> Scala has the nice feature that if you write something like this:
> lst.map(_ - 1)
> It automatically rewrites to a function like this:
> lst.map(x => x - 1)
> This makes writing some higher-order functions much easier.
>
> Of course,
Scala has the nice feature that if you write something like this:
lst.map(_ - 1)
It automatically rewrites to a function like this:
lst.map(x => x - 1)
This makes writing some higher-order functions much easier.
Of course, it's easy to make this using a macro and `#%app'. You can
see the resu
17 matches
Mail list logo