Thanks Sam,

I swear I came *so* close to that!

I'll take a good hard look over the TR Guide; I'm sure it'll make sense.

Tim

On 18/05/15 17:16, Sam Tobin-Hochstadt wrote:
Typed Racket doesn't bring the type variable `A` into scope on the
right-hand side of the `define`, because it isn't a function definition.
This should probably change, but it means that all we need to do is make
the definition less point-free:

(: composed-overhand-shuffler (All (A) (Shuffler A)))
(define (composed-overhand-shuffler x)
   (((inst shuffler-composer A)
     overhand-cutter
     overhand-riffler) x))

Sam

On Mon, May 18, 2015 at 4:15 AM Tim Brown <t...@timb.net
<mailto:t...@timb.net>> wrote:
    I have tried everything (with the exception of the right thing) to mould
    this function to my will:
    - used longhand types rather than the define-types Riffler, Cutter and
        Shuffler
    - All'ed, inst'ed, ann'ed and cast'ed everywhere
    - used various approached to the implementation. Here we
        have call-with-values, but I have used define-values (with/without
        annotations), explicit and automatic currying -- the works.



--
Tim Brown CEng MBCS <tim.br...@cityc.co.uk>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                City Computing Limited · www.cityc.co.uk
      City House · Sutton Park Rd · Sutton · Surrey · SM1 2AE · GB
                T:+44 20 8770 2110 · F:+44 20 8770 2130
────────────────────────────────────────────────────────────────────────
City Computing Limited registered in London No:1767817.
Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE
VAT No: GB 918 4680 96

--
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 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to