Try ->i. I wouldn't worry about performance until makes itself a problem.
On 11/29/19, Ryan Kramer wrote:
> Thanks, but I don't think `case->` works for me. It looks like it chooses a
>
> case purely based on the number of arguments. The following example, when
> given two arguments, will always
Thanks, but I don't think `case->` works for me. It looks like it chooses a
case purely based on the number of arguments. The following example, when
given two arguments, will always choose the integer? case even if both
arguments are strings.
(case-> [-> integer? integer? list?]
[->
I think you want `case->`:
https://docs.racket-lang.org/reference/function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._case-~3e%29%29
On Fri, Nov 29, 2019 at 2:28 PM Ryan Kramer
wrote:
> I'm not exactly sure what I mean by "overloaded function", but I think you
> will
I'm not exactly sure what I mean by "overloaded function", but I think you
will understand. I'm looking for something that would allow me to write a
function contract like
(magic-> [integer? integer? -> integer?]
[string? symbol? -> string?]
[string? ...+ -> string?])
The
Hey everyone,
I am a little confused about Exercise 12.6 from Semantics Engineering with
PLT-Redex. The exercise is as follows:
"Formulate a general reduction relation for ISWIM using a with clause. Use
traces to demonstrate that programs may be reduced to values along several
different paths in
I was reading Scribble's include-section code from
https://github.com/racket/scribble/blob/master/scribble-lib/scribble/base.rkt
and I can't figure out how this makes a section:
(define-syntax (include-section stx)
(syntax-case stx ()
[(_ mod)
(with-syntax ([doc-from-mod (datum->syntax
6 matches
Mail list logo