Thanks for clarifying, Robby.
I'm modeling reduction on nested states. In addition to a collection of
straightforward rules, there is a rule that specifies when to reduce a
state-inside-a-state. I can specify this using evaluation contexts, but in
order for the relation to remain deterministic I n
> This is an area in which there are probably too many options, but opinions
> are strong, and we have not standardized (yet). Feedback is welcome!
Speaking of which, there's also the `threading` package, which I really should
add the point-free version of ~> to.
--
You received this message b
Oft-forgotten feature about the curly-fn package: if you don’t include any
arguments, it works as a shorthand for curry. So really, the idiomatic curly-fn
solution would just be #{map sqr}, the shortest of the four. (Disclaimer: I
wrote the curly-fn package.)
Tongue-in-cheek comments aside, the
There's also the fancy-app, curly-fn, and afl packages for different ways of
writing anonymous functions (cut and cute from srfi/26 always seemed awkward to
me).
cut:
(cut map sqr <>)
fancy-app:
(map sqr _)
curly-fn
#{map sqr %}
afl:
#λ(map sqr %)
point-free doesn't give you special syntax
[Please keep the list CCed.]
2htdp/image has scenes (constructed with `empty-scene`), which are its
equivalent of canvases.
Vincent
On Sat, 12 Dec 2015 10:50:24 -0600,
sagar tripathy wrote:
>
> but in htdp/image there is any way to generate canvas
>
> On Sat, Dec 12, 2015 at 3:40 AM, Vincent
2015年12月13日日曜日 2時21分21秒 UTC+9 Alex Knauth:
> > On Dec 12, 2015, at 9:18 AM, Taro Annual wrote:
>
> > In racket libraries, rackjure module looks usable.
> > But, rackjure's threading(~>) denys lambda.
> >
> >
> > #lang rackjure
> >
> >> (#fn(map sqr %) '(1 2))
> > '(1 4)
> >> (~> '(1 2) #fn
> On Dec 12, 2015, at 9:18 AM, Taro Annual wrote:
> In racket libraries, rackjure module looks usable.
> But, rackjure's threading(~>) denys lambda.
>
>
> #lang rackjure
>
>> (#fn(map sqr %) '(1 2))
> '(1 4)
>> (~> '(1 2) #fn(map sqr %))
> [Error] lambda: not an identifier, identifier wit
I can see why you might have expected that to work that way.
Unfortunately, it doesn't. The identifiers in those places in
shortcuts (Add2, x, and n in your examples below) are not pattern
positions. They are simply identifiers.
In the code you wrote, one could change the rule's left-hand side to
Hi,
I want to make method chains like this:
#lang racket
(define (pipe init . procs)
(foldl (lambda (x y) (x y)) init procs))
(pipe '(3 4)
(lambda (l) (map sqr l))
(lambda (l) (apply + l))
sqrt)
5
In racket libraries, rackjure module looks usable.
But, rackjure's
hi all,ıf you want to send an email about this question ,you have to use this
email (bekoteki...@gmail.com)
Assume that a string is constructed only by numbers separated by spaces. For
example:
“1 2 3 4 5” Numbers are 1, 2, 3, 4 and 5
“10 19 3 200 14”
Hi all,
I want to make a custodian-protected, remotely-controlled service
switcher but there's something wrong with my code. The behaviour isn't
reliable and it leaves traces behind filling the memory eventually. I've
included the code below.
TBH, I may have a less optimal approach to it in
11 matches
Mail list logo