If it was just passing keyword arguments to your function, you might be
able to do it like this:
; https://docs.racket-lang.org/guide/lambda.html
; https://docs.racket-lang.org/reference/procedures.html
(define greet
(lambda (given #:last surname)
(string-append "Hello, " given " " surname)
[I remember an old discussion about this, but I can't find the message.]
For small number of clauses, case is expanded to a bunch of if. When there
are more than ¿12? it may be use a hash table or binary search. It has a
few tricks:
https://github.com/racket/racket/blob/master/racket/collects/rac
> On Aug 22, 2019, at 1:33 PM, Kevin Forchione wrote:
>
> Hi guys,
> Suppose I have something like the following:
>
> (define (f g . args)
> (apply g args))
>
> How would I be able to pass keyword arguments to g?
After racking my brains for the common lisp &allow-other-keys and googlin
(curry (inst map (U Complex False) String)
string->number)
... typechecks, but in your expression, you're going to need to handle
the possibility that the pattern variables in `list-rest` pattern are
#f.
- Jon
On Thu, Aug 22, 2019 at 4:15 PM Štěpán Němec wrote:
>
>
> I have a hard time
Hi guys,
Suppose I have something like the following:
(define (f g . args)
(apply g args))
How would I be able to pass keyword arguments to g?
Kevin
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop
I have a hard time persuading Typed Racket to accept the expression
"(curry map string->number)". No amount of type annotations or added
`inst`s (as recommended by the guide[1]) I could come up with seem to
help.
Is there a way to make it work?
[1]
https://docs.racket-lang.org/ts-guide/caveats
Here's another implementation you might consider. In this version you can
view the body of `phone-numbers` as a language consisting of the `number`
and `number-list` syntactic forms. The language also supports its own kind
of macros---phone number macros---that can expand to forms of the
`phone
On 8/21/2019 3:25 PM, Jon Zeppieri wrote:
Racket's `case` is an implementation of this approach:
http://scheme2006.cs.uchicago.edu/07-clinger.pdf
It is not significantly complicated by `else`. And that approach was
created in the context of Scheme, which leaves the return value
unspecified whe
Why do we have to question Canadians to know the causes of the death of
Charles Aznavour ?
Charles Aznavour was murdered after what he said in an interview. Canada,
like many other countries, disseminates information on litigations against
foreign governments and these code-form (wooden languag
By the way, Paulo: I'm happy to help with this (if you want). I can either
put in some person-hours to get/install the certificate; and/or help
purchase a new one.
On a related note, a meta question for the community: Do we have any
infrastructures in place to help financially support community-d
At Tue, 20 Aug 2019 17:53:45 +0300, Dmitry Pavlov wrote:
> > Your tool would use `make-compilation-manager-load/use-compiled-handler`
>
> In what way my tool would use that?
I think you probably don't want to go this way. But if you want to
support multiple build variants within the same tree, yo
(sorry for the self-followup; the unifier uses immutable hashes; grep
suggests the other hashes that get used a lot are mutable hashes)
On Thu, Aug 22, 2019 at 9:33 AM Robby Findler wrote:
>
> It looks like the pattern unifier uses hashes. I'm not sure if it they
> would end up being good benchma
It looks like the pattern unifier uses hashes. I'm not sure if it they
would end up being good benchmarks (probably best to try to instrument
the hashes to see if they actually get used a lot or not) but there
are redex benchmarks that measure how long it takes to find specific
bugs and one of the
Thanks Alex!
On Thursday, August 22, 2019 at 1:58:13 PM UTC+9, Alex Harsanyi wrote:
>
> This may or may not work for them, but ask the user to open the
> "viewer.rkt" file in their racket installation (it should be in C:\Program
> Files\Racket\share\pkgs\slideshow-lib\slideshow) and comment out
I'm not able to provoke this error with the pieces that you provided.
Just to be sure, it's not an error in the submission that you sent to
the handin server, right? Normally the error in that case would be
"Error in your code", so I think that's not it. But does the error
depend on the program th
Thanks Ben! - Jon
On Wed, Aug 21, 2019 at 10:04 PM Ben Greenman
wrote:
>
> A few of the GTP benchmarks [1] use immutable hashes. Here's a link
> with the ones that look most interesting:
>
> http://ccs.neu.edu/home/types/tmp/gtp-hash.tar.gz
>
>
> And here's a small (untyped) program that uses cod
16 matches
Mail list logo