On Tue, May 24, 2016 at 09:14:22PM -0400, Hendrik Boom wrote:
> On Tue, May 24, 2016 at 08:17:01PM -0400, Leif Andersen wrote:
> > Ya, we should probably have a `color` function in scribble/base.
> > Currently you actually have to use `color-property` found in
> > `scribble/core`.
> >
> > You coul
You can write `(NonemptyListof a)` as
(define-type (NonemptyListof a) (Cons a (Listof a)))
Sam
On Wed, May 25, 2016 at 5:08 PM, Daniel Prager
wrote:
> Thank-you Matthias
>
> On Wed, May 25, 2016 at 10:46 PM, Matthias Felleisen
> wrote:
>>
>>
>> 1. You had a } mistake.
>
>
> I see it now.
Thank-you Matthias
On Wed, May 25, 2016 at 10:46 PM, Matthias Felleisen
wrote:
>
> 1. You had a } mistake.
>
I see it now.
By putting an extra ) at the end of the λ I committed an arity error.
I could have seen this in DrRacket if I formatted as you did, with the
separate arguments to map on
That program works fine for me. The full code that I ran is here:
https://gist.github.com/samth/0992fff495cbff20e4aed96522c69332
Sam
On Wed, May 25, 2016 at 5:31 AM, Daniel Prager
wrote:
> Thanks Sam
>
> I still get a type-checking error with
>
> (: encode : (All (a) (Listof a) -> (Listof (List
Try typing that one :-)
> On May 25, 2016, at 9:03 AM, Robby Findler
> wrote:
>
> So: yet one more reason to prefer for/list over map? :)
>
> Robby
>
> On Wed, May 25, 2016 at 7:46 AM, Matthias Felleisen
> wrote:
>>
>> 1. You had a } mistake.
>>
>> 2. You are using a polymorphic map an
So: yet one more reason to prefer for/list over map? :)
Robby
On Wed, May 25, 2016 at 7:46 AM, Matthias Felleisen
wrote:
>
> 1. You had a } mistake.
>
> 2. You are using a polymorphic map and TR needs an additional annotation to
> figure this out:
>
> (: encode : (All (a) (Listof a) -> (Listof
1. You had a } mistake.
2. You are using a polymorphic map and TR needs an additional annotation to
figure this out:
(: encode : (All (a) (Listof a) -> (Listof (List Nonnegative-Integer a
(define (encode xs)
({inst map (List Nonnegative-Integer a) (Listof a)}
(λ ([ys : (Listof a)])
Thanks Sam
I still get a type-checking error with
(: encode : (All (a) (Listof a) -> (Listof (List Nonnegative-Integer a
(define (encode xs)
(map (λ (*[ys : (Listof a)]*)
(list (length ys) (first ys))
(pack xs
which I think is what you suggested. Adding a return type t
8 matches
Mail list logo