Hi Justin,
thanks for reply and the code! :)
Cheers
Meino
Justin Zamora [16-11-17 04:02]:
> I think you are looking for something like this:
>
> #lang racket
>
> (require test-engine/racket-tests)
>
> (define (remove-empty-lists lst)
> (cond
> [(null? lst) '()] ;
On 11/16/2016 08:24 PM, Dan Liebgold wrote:
FWIW, Eric Dobson wrote a very nice `define-literal-syntax-class` macro
that is used extensively inside TR.
https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt
Hmm... I can't quite
On 11/16/2016 07:51 PM, Vincent St-Amour wrote:
FWIW, Eric Dobson wrote a very nice `define-literal-syntax-class` macro
that is used extensively inside TR.
https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt
Its companion
On 11/16/2016 07:42 PM, Dan Liebgold wrote:
Literal sets can include datum-literals:
(define-literal-set lits #:datum-literals (a b c) (d e))
Ah, oops I missed that keyword parameter.
For question 1, that's probably the best way. If you want to suppress
the printing of all of the
Ah, I should have thought of that. Yep, it works. Thanks.
On Wed, Nov 16, 2016 at 5:12 PM, Greg Hendershott wrote:
> racket-mode is on MELPA:
>
> https://melpa.org/#/racket-mode
>
> But not MELPA stable.
>
> Personally I use only MELPA non-stable, because I like
I think you are looking for something like this:
#lang racket
(require test-engine/racket-tests)
(define (remove-empty-lists lst)
(cond
[(null? lst) '()] ; Check for end of list
[(null? (first lst)) (remove-empty-lists (rest lst))] ; Skip null
sublist
[(not (list? (first lst))) ;
> FWIW, Eric Dobson wrote a very nice `define-literal-syntax-class` macro
> that is used extensively inside TR.
>
>
> https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt
>
Hmm... I can't quite figure that one out. Maybe with some
racket-mode is on MELPA:
https://melpa.org/#/racket-mode
But not MELPA stable.
Personally I use only MELPA non-stable, because I like packages to
break all the time. Seriously, it's been fine, for me.
In Emacs 24.4+ I understand it's possible to use both. You can say to
get certain packages
FWIW, Eric Dobson wrote a very nice `define-literal-syntax-class` macro
that is used extensively inside TR.
https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt
Its companion `define-merged-syntax-class` is quite nice too.
>
> Literal sets can include datum-literals:
>
>(define-literal-set lits #:datum-literals (a b c) (d e))
>
Ah, oops I missed that keyword parameter.
> For question 1, that's probably the best way. If you want to suppress
> the printing of all of the datum literals in error messages, you
On 11/16/2016 06:11 PM, Dan Liebgold wrote:
Hi,
A couple questions about literals in syntax-parse:
1. I'd like to make a syntax-class that is just a set of literals
(with a clear error for something not matching any literal). Is there
a better way than this:
http://pasterack.org/pastes/86722
Hi,
A couple questions about literals in syntax-parse:
1. I'd like to make a syntax-class that is just a set of literals (with a clear
error for something not matching any literal). Is there a better way than this:
http://pasterack.org/pastes/86722
I need to ignore the bindings for those
Hi David,
thanks for the reply and the link! :)
I have a list of sublist, which I want to process recursively.
Some sublists are empty, some are filled.
The typical pattern is (as far as I know)
(define (process-list lst)
(cons (do-somthing-with-sublist (car lst)) (process-lst (car
On Wed, Nov 16, 2016 at 11:10 AM, David Storrs
wrote:
> Hi Meino,
>
> As a suggestions, you might want to read through this page on Stack
> Overflow about how to ask technical questions:
> http://stackoverflow.com/help/how-to-ask The summary is: tell us what
> you're
Hi Meino,
As a suggestions, you might want to read through this page on Stack
Overflow about how to ask technical questions:
http://stackoverflow.com/help/how-to-ask The summary is: tell us what
you're trying to achieve, what you've tried, and what *specifically* is not
working.
The question
> On Nov 16, 2016, at 1:04 PM, meino.cra...@gmx.de wrote:
>
> ...no, not a homework...
> I want to teach myself some racket and hope 'to get it' finally...
> Since I am no native speaker I have the deficulty to search for
> things, which names I dont know...
Meino, have you considered reading
Hi John,
thank you for your reply ! :)
...no, not a homework...
I want to teach myself some racket and hope 'to get it' finally...
Since I am no native speaker I have the deficulty to search for
things, which names I dont know...
One example of my code is:
(define (trim-list lst)
(if (empty?
The program has a few errors.
For example,
* (define O ( X0 Y0 ))
should be something like
(define O (make-point X0 Y0))
(define O (point X0 Y0))
(define O (vector X0 Y0))
I'm not sure because the first two don't exist and I guess the last one is
not what you want, but you
(define (ballon-tourne)
(local [(define LARG 110 )
(define HAUT 110 )
(define SCENE (carre 100 100 'outline "black"))
(define BALLON ( circle 5 'solid "red"))
(define X0 (/ LARG 2))
(define Y0 (/ HAUT 2 ))
(define O ( X0
19 matches
Mail list logo