Sampsa Kiiskinen

Results 14 issues of Sampsa Kiiskinen

I tried to define the writer monad with an arbitrary monoid as the accumulator, but could not figure out how to express the necessary class constraint. The following program raises...

Is it possible to invert the operation? I would like to be able to select symbols and convert them back into commands.

I would like to endow `apply` and other such procedures with more precise contracts, as seen below. ``` racket (define/contract apply/contract (parametric->/c (src ... dst) (-> (-> src ... dst)...

The following program works as expected. ``` racket #lang racket (define affine-contract (lambda (arg) arg)) (define/contract identity/contract (parametric->/c (a) (-> a (affine-contract a))) identity) (+ 2 (identity/contract 3)) ``` ```...