Using λ~> with Rackjure's applicable dictionaries
dkvasnicka opened this issue · comments
Hi, I'm trying to use λ~>
with applicable dictionaries and I'm running into an issue where Racket complains 'x
is not a procedure:
#lang rackjure
(define h (hasheq 'x (hasheq 'y 1)))
; works
(~> h 'x 'y)
; works
((λ (v) (~> v 'x 'y)) h)
; fails: expected a procedure that can be applied to arguments, given: 'x
((λ~> 'x 'y) h)
Am I doing something wrong? Looks like somehow Rackjure doesn't kick in when running the last example.
/cc @greghendershott (not sure if this is the right place for this issue - maybe it's a problem with Rackujre not recognizing this scenario as a key-to-dict application because it sees no dict?)
A nice workaround is to use the applicable version of hash-ref-nested-lens
from the lens
pkg.
This seems related to #3, which was the same issue, but for ~>
. I will investigate.
Works like a charm, thanks!