Hi Jordan,
The simplest change I see to your code...
(define-values (year month day)
(regexp-split #rx"/" "2012/06/06"))
...is this:
(define-values (year month day)
(apply values (regexp-split #rx"/" "2012/06/06")))
Best,
jmj
--
Sent from my Android phone with K-9 Mail.
users-requ...@racket
(define-values (year month day)
(apply values (regexp-split #rx"/" "2012/06/06")))
On 6/11/2012 12:24 PM, Jordan Schatz wrote:
Is there a way to unwrap or explode a list? I don't see it in the docs, but it
seems like it would be a common thing.
Racket Users list:
htt
On Wed, Jun 6, 2012 at 2:40 PM, Viera Proulx wrote:
> I am starting to play with scribble and have tried to generate a pdf document
> from the scribble source. The conversion to html worked fine.
>
> When I hit the Scribble to PDF button I got:
>
> Welcome to DrRacket, version 5.2.1 [3m].
> Langu
(apply (lambda (year month day)
(printf "Year: ~S Month: ~S Day: ~S\n"
year
month
day))
(regexp-split #rx"/" "2012/06/06"))
Neil V.
Racket Users list:
http://lists.racket-lang.org/users
A few minutes ago, Jordan Schatz wrote:
>
> Is there a way to unwrap or explode a list? I don't see it in the
> docs, but it seems like it would be a common thing.
>
> This is what I want to do:
>
> (define-values (year month day)
> (regexp-split #rx"/" "2012/06/06"))
>
> But regexp-split ret
You could use match or match-let, e.g.,
(match-let ([(list year month day) (regexp-split #rx"/" "2012/06/06")])
…)
http://docs.racket-lang.org/reference/match.html
On Jun 11, 2012, at 8:24 PM, Jordan Schatz wrote:
>
> Is there a way to unwrap or explode a list? I don't see it in the docs, bu
Is there a way to unwrap or explode a list? I don't see it in the docs, but it
seems like it would be a common thing.
This is what I want to do:
(define-values (year month day)
(regexp-split #rx"/" "2012/06/06"))
But regexp-split returns a list, not values, so I'd like to "unwrap" the list
an
How about this: until you find the perfect way to do this, we just add
two new optional keyword arguments to sort that deal with two levels
of key/sorts? eg:
(sort lst < #:key first #:key2 second)
would mean to sort by < for both keys, treating the first position in
the list as the main one and t
[Setting followups to the dev list.]
20 minutes ago, Robby Findler wrote:
> On Mon, Jun 11, 2012 at 11:37 AM, Eli Barzilay wrote:
> > So the bottom line is that there's no need to extend `sort' for
> > this kind of functionality. What would be nice to have though, is
> > such a comparison combin
On Mon, Jun 11, 2012 at 11:37 AM, Eli Barzilay wrote:
> So the bottom line is that there's no need to extend `sort' for this
> kind of functionality. What would be nice to have though, is such a
> comparison combinator -- and the only reason there's nothing that
> comes pre-packaged is that I did
Mark and David
Thanks, I got it working
-- Viera
On Jun 8, 2012, at 4:30 PM, Mark Millikan wrote:
> Two work arounds:
>
> 1. Launch DrRacket from a terminal with
>
> 2. Run
>
> ==
>
> This fragment from racket/collects/redex/private/dot.rkt succinctly describes
> th
Yesterday, Harry Spier wrote:
> [...]
>
> What I meant was something like this:
> (sort '((9 9 9) (8 8 8) (8 9 8) (7 7 7) (7 9 7)) (> #:key first) (>
> #key second))
>> '((9 9 9) (8 9 8) (8 8 8) (7 9 7) (7 7 7))
Ah, so you want to sort with a major/minor comparators? There's
nothing built in for
Folks,
Are there any racket (or scheme) social groups in London,
Surrey or the South East of England?
Tim
--
Tim Brown | City Computing Limited|
T: +44 20 8770 2110| City House, Sutton Park Road |
F: +44 20 8770 2130| Sutton, Surrey, SM1 2AE, G
On Mon, Jun 11, 2012 at 10:26 AM, Neil Van Dyke wrote:
> "read-accept-lang" and "read-accept-reader" seem to do most of the work.
>
I have looked for those several times but somehow never found them! Thank
you very much Neil!
Laurent
>
> There is still a few details to attend to. What McFly To
"read-accept-lang" and "read-accept-reader" seem to do most of the work.
There is still a few details to attend to. What McFly Tools currently
does before calling progedit for the simpler case of "info.rkt" files
only is to identify one of 3 different formats: no module, #lang, and
"(module .
Hi,
Since it's not the first time I'm having a hard time with this issue (and I
know others have too), I'm going to ask for advice or for a feature request:
Reading arbitrary Racket-related files with `read' and `read-syntax'
becomes complicated when there are #lang and especially #reader lines.
16 matches
Mail list logo