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
Hi, I am attempting to add seq[int32] and seq[float32] to a context.
I have made this work by doing this:
import mustache
import mustachepkg/values
proc castValue*(values:seq[float32]): Value =
var vs: seq[Value]
for v in values:
vs.add(v.float.castValue)
Value(kind: vkSeq, vSeq: vs)
var ctx = newContext()
ctx["a"] = @[23'f32, 33'f32]
but it would be nice if this were supported in the library.
thanks for the nice package.
The text was updated successfully, but these errors were encountered:
Hi, I am attempting to add
seq[int32]
andseq[float32]
to a context.I have made this work by doing this:
but it would be nice if this were supported in the library.
thanks for the nice package.
The text was updated successfully, but these errors were encountered: