working map interp
This commit is contained in:
parent
46aa456bd1
commit
d86225ca47
@ -11,15 +11,14 @@ function astuples(xs)
|
|||||||
all(x->!(x==nothing), xs) ? xs : nothing
|
all(x->!(x==nothing), xs) ? xs : nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
# function interp(ctx, ::typeof(map), f, xs...)
|
function interp(ctx, ::typeof(map), f, xs...)
|
||||||
# f = interpret(ctx, f)
|
f = interpret(ctx, f)
|
||||||
# xs = interpret(ctx, xs)
|
xs = interpret(ctx, xs)
|
||||||
# xs′ = astuples(xs)
|
xs′ = astuples(xs)
|
||||||
# xs′ == nothing ? constant(:MAPFAIL) : @show map(f, xs...)
|
xs′ == nothing ? vertex(map, constant(f), xs...) : group(map(f, xs′...)...)
|
||||||
# end
|
end
|
||||||
|
|
||||||
function interp(ctx, model, xs...)
|
function interp(ctx, model, xs...)
|
||||||
@show model
|
|
||||||
g = graph(model)
|
g = graph(model)
|
||||||
g == nothing && return vertex(model, map(constant, interpret(ctx, xs))...)
|
g == nothing && return vertex(model, map(constant, interpret(ctx, xs))...)
|
||||||
interpret(ctx, g, xs...)
|
interpret(ctx, g, xs...)
|
||||||
|
Loading…
Reference in New Issue
Block a user