Skip to content
Discussion options

You must be logged in to vote

This exists. Sorry again about the lack of documentation. Try fn:name:list and fn:list:get

Here is an example interpreter session:

mg >foo(/a/b/c).
defined [foo(A0)].
mg >bar(X) :- foo(Z) |> let X = fn:name:list(Z).
defined [foo(A0) bar(A0)].
mg >baz(X) :- foo(Z) |> let Y = fn:name:list(Z), let X = fn:list:get(Y, 0).
defined [foo(A0) bar(A0) baz(A0)].
mg >?bar
bar([/a, /b, /c])
Found 1 entries for bar(X0).
mg >?baz
baz(/a)
Found 1 entries for baz(X0).

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by tdunning
Comment options

You must be logged in to vote
1 reply
@burakemir
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants