The trick is that 'whitespace' isn't just #\space. It's any sequence of
whitespace characters, like "\r\r\r" or " \r\n\t"
On Wed, Nov 2, 2016 at 12:12 AM, wrote:
> Hi,
>
> when using the search function for the Racket-docs
> with string-trim I found:
>
> -
> Trims the input str b
Hi,
when using the search function for the Racket-docs
with string-trim I found:
-
Trims the input str by removing prefix and suffix sep, which defaults to
whitespace. A string sep is matched literally (as opposed to being used as a
regular expression).
Use #:left? #f or #:righ
On Tue, Nov 1, 2016 at 6:51 PM, Robby Findler
wrote:
> On Tue, Nov 1, 2016 at 2:06 PM, David Storrs
> wrote:
> >> It is a syntax error.
> >
> >
> > Absolutely, but that's not what the message says. :>
>
> Yes, syntax errors in "#lang racket" and its variants don't come with
> the word "syntax"
On Tue, Nov 1, 2016 at 2:06 PM, David Storrs wrote:
>> It is a syntax error.
>
>
> Absolutely, but that's not what the message says. :>
Yes, syntax errors in "#lang racket" and its variants don't come with
the word "syntax" in them, but you can tell because they happen before
you run code (i.e.,
On Tuesday, November 1, 2016 at 3:01:44 PM UTC-7, Dan Liebgold wrote:
>
> -
> https://docs.racket-lang.org/syntax/varied-meanings.html?q=define-syntax-class#%28part._.Non-syntax-valued_.Attributes%29
>
For example, I can't seem to access the "ast" attribute in this particular
example without a
I'm working with syntax-parse, and the examples in the docs are quite useful,
but several seem stop before they get to the good part. Is there any way
someone could supply examples of using the syntax classes developed in these
sections:
-
https://docs.racket-lang.org/syntax/varied-meanings.h
As an aside, I've written (define (rest-> arg result) (->* () #:rest (listof
arg) result)) enough times that it'd be nice if it was either in the
racket/contract library or a sugar/contract lib on the package server.
--
You received this message because you are subscribed to the Google Groups
On Tue, Nov 1, 2016 at 1:34 PM, John Clements
wrote:
>
> > On Nov 1, 2016, at 8:02 AM, David Storrs wrote:
> >
> ...
> > > Is it possible to jump right into a list at a certain item of
> > > the list and to start processing there?
> >
> > Yes. What you want is list-ref
> >
> > (define my-list '
On Tue, Nov 1, 2016 at 2:52 PM, Robby Findler
wrote:
>
>
> On Tuesday, November 1, 2016, David Storrs wrote:
>
>>
>>
>> On Tue, Nov 1, 2016 at 12:58 PM, Robby Findler <
>> ro...@eecs.northwestern.edu> wrote:
>>
>>> I wish I could see how to make a better error message for this input,
>>> but I'm
Hi Jon,
thank you for your mind reading! :::)))
Exactly!
Now I know, that racket passes references under the hood
and the world is getting a better place again.
Cheers
Meino
Jon Zeppieri [16-11-01 04:40]:
> On Mon, Oct 31, 2016 at 11:28 PM, wrote:
>
> >
> > Hi Jon,
> >
> > thanks for rep
Hi David,
thanks for your...:) DOCUMENTATION PROJECT :).!!!
Whow!
Now I have a lot to read!
Cheers
Meino
David Storrs [16-11-01 18:47]:
> Hi Meino,
>
> Good news! There are built-ins that will do almost all of this for you:
>
> On Mon, Oct 31, 2016 at 10:53 PM, wrote:
> > Hi,
> >
>
'John Clements' via Racket Users [16-11-01
18:47]:
>
> > On Nov 1, 2016, at 8:02 AM, David Storrs wrote:
> >
> ...
> > > Is it possible to jump right into a list at a certain item of
> > > the list and to start processing there?
> >
> > Yes. What you want is list-ref
> >
> > (define my-lis
George Neuner [16-11-01 18:47]:
> On Tue, 01 Nov 2016 06:47:24 +0100, Vincent St-Amour
> wrote:
>
> >FWIW, your `find-it` is a thin wrapper over `memf` from `racket/base`.
> >
> >Vincent
>
> Sort of. In a roundabout way, the OP also asked about how to return
> multiple values from a function.
On Tuesday, November 1, 2016, David Storrs wrote:
>
>
> On Tue, Nov 1, 2016 at 12:58 PM, Robby Findler <
> ro...@eecs.northwestern.edu
> > wrote:
>
>> I wish I could see how to make a better error message for this input,
>> but I'm not seeing it. Do you?
>>
>> Robby
>>
>>
> With this function:
>
Hi Vincent,
thanks for your info! :)
...but unfortunately I cannot find find-it in
the docs...
Cheers
Meino
Vincent St-Amour [16-11-01 18:47]:
> FWIW, your `find-it` is a thin wrapper over `memf` from `racket/base`.
>
> Vincent
>
>
>
> On Tue, 01 Nov 2016 05:06:47 +0100,
> George Neuner
Hi Ken,
thanks for your reply ! :)
...sorry, I forgot to mention a certain aspect:
The list begins with unwanted items and after that,
all following items are wanted.
Finding the first wanted item means: The search is over
now, from here happiness will start! :)
"Filter"ing means to crawl down th
George Neuner [16-11-01 18:47]:
> On Tue, 1 Nov 2016 09:24:54 -0400, David Storrs
> wrote:
>
> >I also have been getting [duplicate posts], and I use GMail.
> >
> >I suspect part of the problem is that when I hit "Reply All" to this
> >message, it was going to send to "Meino + list" and I had to
On Tue, Nov 1, 2016 at 12:58 PM, Robby Findler
wrote:
> I wish I could see how to make a better error message for this input,
> but I'm not seeing it. Do you?
>
> Robby
>
>
With this function:
(define/contract (register-functions . func-list)
(->* () #:rest (listof procedure?) () any)
I go
> On Nov 1, 2016, at 8:02 AM, David Storrs wrote:
>
...
> > Is it possible to jump right into a list at a certain item of
> > the list and to start processing there?
>
> Yes. What you want is list-ref
>
> (define my-list '(a b c d e f g))
>
> (list-ref (list 'a 'b 'c) 0)
> 'a
Oog, no, don
I wish I could see how to make a better error message for this input,
but I'm not seeing it. Do you?
Robby
On Tue, Nov 1, 2016 at 11:50 AM, David Storrs wrote:
> Aha. It's always the simple things that get you. Thanks, Alexis.
>
> On Tue, Nov 1, 2016 at 12:30 PM, Alexis King wrote:
>>
>> You
Aha. It's always the simple things that get you. Thanks, Alexis.
On Tue, Nov 1, 2016 at 12:30 PM, Alexis King wrote:
> You have the order wrong for ->*. The #:rest option should come
> after the positional argument contracts, just before the return
> contract. Since this function has no positi
You have the order wrong for ->*. The #:rest option should come
after the positional argument contracts, just before the return
contract. Since this function has no positional optional arguments,
you can either omit the optional positional argument contracts
entirely:
(->* () #:rest (listof pr
What would the correct contract for this function be?
(define/contract (register-functions . func-list)
(->* () #:rest (listof procedure?) () any) ;; this is wrong
(for ((f func-list)) ...do something...))
I've read through the docs below and it doesn't make clear how to do it.
https://
Hi Meino,
Good news! There are built-ins that will do almost all of this for you:
On Mon, Oct 31, 2016 at 10:53 PM, wrote:
> Hi,
>
> I have a lng list of something. And I have a recursive serach
> function to crawl down the list and search for a previously determined
> item.
> When found,
On Tue, 1 Nov 2016 09:24:54 -0400, David Storrs
wrote:
>I also have been getting [duplicate posts], and I use GMail.
>
>I suspect part of the problem is that when I hit "Reply All" to this
>message, it was going to send to "Meino + list" and I had to
>explicitly delete your name before sending.
I am wondering why not use a filter on the list?
Ken
On Monday, October 31, 2016 at 10:53:25 PM UTC-4, meino.cramer wrote:
> Hi,
>
> I have a lng list of something. And I have a recursive serach
> function to crawl down the list and search for a previously determined
> item.
> When found, t
I also have been getting that, and I use GMail.
I suspect part of the problem is that when I hit "Reply All" to this
message, it was going to send to "Meino + list" and I had to
explicitly delete your name before sending.
On Tue, Nov 1, 2016 at 1:00 AM, wrote:
> Hi,
>
> not a Racket thing...
>
On Tue, 01 Nov 2016 06:47:24 +0100, Vincent St-Amour
wrote:
>FWIW, your `find-it` is a thin wrapper over `memf` from `racket/base`.
>
>Vincent
Sort of. In a roundabout way, the OP also asked about how to return
multiple values from a function. memf doesn't do that.
My point was to illustrate
28 matches
Mail list logo