Skip to content

Instantly share code, notes, and snippets.

@rhizoome
Created March 14, 2016 14:09
Show Gist options
  • Save rhizoome/f5d57ed866771b9c530a to your computer and use it in GitHub Desktop.
Save rhizoome/f5d57ed866771b9c530a to your computer and use it in GitHub Desktop.
Here my first improvements:
subset([], List2) <= (List2 == List2)
subset(L1, L2) <= (
(len_(L1) > 0) &
(L1[0]._in(L2)) & # first element in L2
subset(L1[1:], L2) # remainder is a subset of L2
)
I still get DatalogError: Syntax error: Incorrect use of aggregation. And of course there has to be a more elegant way of saying True (List2 == List2).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment