Last active
August 1, 2018 22:30
-
-
Save jhannah/c301caffb83d43dad097841e1caad7d6 to your computer and use it in GitHub Desktop.
Reduces?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "and": [ | |
{ "==" : [ { "var": "gender" }, "women" ] }, | |
{ "and": [ | |
{ "<=" : [ { "var": "age" }, 34 ] }, | |
{ ">=" : [ { "var": "age" }, 25 ] } | |
] }, | |
{ "==": [ { "var": "have_childen" }, true ] } | |
]} | |
reduces to: | |
{[ | |
{ "==" : [ { "var": "gender" }, "women" ] }, | |
{ "<=" : [ { "var": "age" }, 34 ] }, | |
{ ">=" : [ { "var": "age" }, 25 ] } | |
{ "==" : [ { "var": "have_childen" }, true ] } | |
]} | |
If we're inventing syntax? : | |
{[ | |
[ "gender", "==", "women" ], | |
[ "age", "<=", 34 ], | |
[ "age", ">=", 25 ], | |
[ "have_children", "==", true ] | |
]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment