You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to build a formula with the f{} macro and importing json at the same time, we'll encounter:
Error: undeclared identifier: 'f'
For instance:
import ggplotnim
import json
let f = f{"Channel"=="Ch 0"}
echo f
This is due to the {} procs exported in json. This is confusing to me, since these are procs and our string / identifier input should never match their signature.
let f =fn {"Channel"=="Ch 0"} # note the required space!let f2 =fn({"Channel"=="Ch 0"})
let f3 = fn:
{"Channel"=="Ch 0"}
In this case the requirement for the curly brackets could of course be removed. I'm not sure which syntax I prefer. If anyone has ideas / an opinion, please let me know!
The text was updated successfully, but these errors were encountered:
When trying to build a formula with the
f{}
macro and importingjson
at the same time, we'll encounter:Error: undeclared identifier: 'f'
For instance:
This is due to the
{}
procs exported injson
. This is confusing to me, since these are procs and our string / identifier input should never match their signature.I suppose this is because the implementation for the
f{}
macro is using the signature:where the first arg
x
is required to bef
andy
is the actual content of thennkCurly
.For now as a workaround I'll be adding a
fn
macro, which expects annnkCurly
argument:which can then be called via:
In this case the requirement for the curly brackets could of course be removed. I'm not sure which syntax I prefer. If anyone has ideas / an opinion, please let me know!
The text was updated successfully, but these errors were encountered: