Gah, of course it's possible with patterns. For some reason I just didn't
think of matching `(id rest ...)`
(define-syntax (rearrange stx)
(syntax-case stx ()
[(_ [(id rest ...) body]
more ...)
#'(cons '[id body]
(rearrange [(rest ...) body]
I'm 95% sure I've done this before, but for some reason I am really stuck
right now. Given
(rearrange ([(a b c) 1]
[(d e) 2]))
I would like any kind of shape containing [a 1] [b 1] [c 1] [d 2] [e 2].
Any kind of nesting should be fine as long as the ids are matched up 1:1
with the
The way I we imagined it, it would be implemented like the workaround of a
getter function, but with an identifier macro to hide the function from the
person using the mutable identifier.
Alex Knauth (mobile)
> On Feb 17, 2020, at 7:22 PM, Ben Greenman wrote:
>
> On 2/17/20, Bertrand
On 2/17/20, Bertrand Augereau wrote:
> Hello and thank you Ben for the explanation,
>
> I had already implemented the workaround, I'll keep it :)
> It seems that wrapping every binding access in a function is seen as
> unnecessary in Scheme and Common Lisp ("Reference needed" :) ) but
> it's a
Hi,
Racket News issue 26 is here:
https://racket-news.com/2020/02/racket-news-issue-26.html
Enjoy,
Paulo Matos
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
Yes, I understood that. Speaking for myself I'd want to see what other people
are doing to inform my own designs. My suggestion was in that spirit.
Original Message
On Feb 17, 2020, 5:12 PM, Paulo Matos wrote:
> On Thursday, 13 February 2020 14:35:42 UTC+1, Sage Gerard wrote:
On Thursday, 13 February 2020 06:05:49 UTC+1, Xu Xue wrote:
>
> Hi, all
>
> I am a senior student and plan to build a continuous integration system
> using Racket as my graduation project.
>
> I'm very new to Racket web programming and CI/CD (about CI system I've
> already found some great
On Thursday, 13 February 2020 14:35:42 UTC+1, Sage Gerard wrote:
>
> Some core devs are already looking into building a new CI/CD for use in
> the project. Maybe it would be worth taking a look at the Racket Slack and
> ask if you can participate in the #ci channel.
>
>
Sage, correct me if I
On 2/17/2020 12:12 PM, Lawrence Bottorff wrote:
I found these blowing down the sidewalk today
; TRUE = λx.λy.x
(define mytrue
(lambda (t) (lambda (f) t)))
and
; FALSE = λx.λy.y
(define myfalse
(lambda (t) (lambda (f) f)))
Two problems, I don't understand them and AFAICT, they don't
Hi,
The idea is that you can encode an expression
"if B then P else Q"
as a λ-term BPQ. So if B is true, you get P, otherwise Q.
For an overview of λ-calculus I suggest reading this:
https://ecee.colorado.edu/ecen5533/fall11/reading/lambda_types.pdf
The encoding of boolean expressions is
I found these blowing down the sidewalk today
; TRUE = λx.λy.x
(define mytrue
(lambda (t) (lambda (f) t)))
and
; FALSE = λx.λy.y
(define myfalse
(lambda (t) (lambda (f) f)))
Two problems, I don't understand them and AFAICT, they don't work. I traced
them back to this
Hello and thank you Ben for the explanation,
I had already implemented the workaround, I'll keep it :)
It seems that wrapping every binding access in a function is seen as
unnecessary in Scheme and Common Lisp ("Reference needed" :) ) but
it's a tool I use a lot in my favorite statically typed
If you export a "getter" function instead of the list, both modules
have the same behavior:
```
#lang racket/base
(module racket_mod racket
(provide (struct-out s))
(provide get-s)
(provide set-list-of-s!)
(struct s (a))
(define list-of-s '())
(define (get-s) list-of-s)
(define
Hello everybody,
I'm trying to gradually type my script to make it a proper app (yes
I'm a static-ish guy) and I have an issue (Racket 7.6 CS).
===
racket_mod.rkt:
#lang racket
(provide (struct-out s))
(provide list-of-s)
(provide set-list-of-s!)
14 matches
Mail list logo