summaryrefslogtreecommitdiffstats
path: root/content/zettel/2e1c3a.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/zettel/2e1c3a.md')
-rw-r--r--content/zettel/2e1c3a.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/content/zettel/2e1c3a.md b/content/zettel/2e1c3a.md
new file mode 100644
index 0000000..027d1c4
--- /dev/null
+++ b/content/zettel/2e1c3a.md
@@ -0,0 +1,21 @@
++++
+title = "Abstract the nested if-statements into a list"
+author = "Yann Herklotz"
+tags = []
+categories = []
+backlinks = ["2e1c3"]
+forwardlinks = ["2e1c5", "2e1c3b"]
+zettelid = "2e1c3a"
++++
+
+The main problem with the nested if-statements is that they are ordered,
+meaning that one can not simply order them and end up with the same
+behaviour. This depends on the fact of if two predicates are satisfiable
+or not, which affects on if they can be switched or not.
+
+This can be solved with a similar solution to the full SAT solution
+([\#2e1c5]), whereby the if-statements are collapsed into a list of
+conditionals, out of which only one can be active at a time. This means
+that their order does not matter, and that they can then be sorted.
+
+ [\#2e1c5]: /zettel/2e1c5