Is there a way to define a type constructor that accepts keyword arguments?
I know that things like the Class type constructor do this already, so is there
a way to define something like this myself?
The reason is I have a struct that represents a dimension (as in dimensional
analysis and u
Thanks! That gets me a little closer - to the next problem, at least.
My module language provides some typed functions; when using those
functions in my newly typed module language, the type checker
complains that it doesn't have the type info. Any ideas?
-> (module testimport typed/racket
(:
You are correct. The case lambda will accept 1 2 or 3 args. The construction
process may not accept 1 arg tomorrow
On Jun 6, 2014, at 2:18 PM, Asumu Takikawa wrote:
> On 2014-06-06 13:31:17 -0400, Matthias Felleisen wrote:
>> I think we can get them in this sense:
>>
(arity-includes?
On 2014-06-06 13:31:17 -0400, Matthias Felleisen wrote:
> I think we can get them in this sense:
>
> > > (arity-includes? (procedure-arity (case-lambda [(x) x][(x y) x][(x y z)
> > > x])) 1)
> > #t
> > > (arity-includes? (procedure-arity (case-lambda [(x) x][(x y) x][(x y z)
> > > x])) 3)
> > #t
I think we can get them in this sense:
> > (arity-includes? (procedure-arity (case-lambda [(x) x][(x y) x][(x y z)
> > x])) 1)
> #t
> > (arity-includes? (procedure-arity (case-lambda [(x) x][(x y) x][(x y z)
> > x])) 3)
> #t
> > (arity-includes? (procedure-arity (case-lambda [(x) x][(x y) x][(
On 2014-06-06 06:31:27 +0100, Matthew Flatt wrote:
> Sorry for being so late to the discussion, but I agree that something
> like `class-constructor-arity` and `class-constructor-arity-includes?`
> should be added to `racket/class`.
Are those even possible to implement?
After all, I can construct
The new expression dos not designate an initial field value for x even though
the contract says there must be one. You can also specify 'a as the initial
value for x inside the class and the contract system won't tell you that your
object does not have a correct field value. When you eventually
What is wrong with this?
Robby
On Thu, Jun 5, 2014 at 8:13 PM, Matthias Felleisen wrote:
>
> class/c doesn't check inits properly:
>
> #lang racket
>
> (provide
> (contract-out
> [c% (class/c (init-field [x number?]))]))
>
> (define c%
> (class object%
> (field (x 10))
> (super-n
--
CALL FOR TALK PROPOSALS
HOPE 2014
The 3rd ACM SIGPLAN Workshop on
Higher-Order Programming with Effects
August 31, 2014
Thank you for the explanation Matthew, that all makes sense to me now.
Racket Users list:
http://lists.racket-lang.org/users
10 matches
Mail list logo