Skip to content

Commit 84cdfbb

Browse files
committed
unwrap_head
1 parent c4ae894 commit 84cdfbb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/fexpr.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,13 @@ function wrap_fun(fexpr::Expr)
8787
end
8888
end
8989

90+
################################################################
91+
function unwrap_head(head)
92+
wherestack = Any[]
93+
while head isa Expr && head.head == :where
94+
push!(wherestack, head.args[2])
95+
head = head.args[1]
96+
end
97+
fcall = head
98+
fcall, wherestack
99+
end

0 commit comments

Comments
 (0)