summaryrefslogtreecommitdiff
path: root/examples/e.int
diff options
context:
space:
mode:
authorTom Harley2020-01-11 19:46:15 +0000
committerTom Harley2020-01-11 19:46:15 +0000
commit9e87372371794bc3e7d46698141966c00acaad0e (patch)
tree068da13d97cefed2e49ab06843e1dd9d97c32f6a /examples/e.int
parentAdded int width specifiers (diff)
downloadsinter-9e87372371794bc3e7d46698141966c00acaad0e.tar.gz
sinter-9e87372371794bc3e7d46698141966c00acaad0e.zip

Tidying up

  • Removed unused example files
  • Removed redundant common.c
  • Added extra files to make sure the current version compiles the nqueens solution correctly
  • Added extensionless files to .gitignore
  • Added a way to install sinter
Diffstat (limited to 'examples/e.int')
-rw-r--r--examples/e.int21
1 files changed, 0 insertions, 21 deletions
diff --git a/examples/e.int b/examples/e.int
deleted file mode 100644
index f49b406..0000000
--- a/examples/e.int
+++ /dev/null
@@ -1,21 +0,0 @@
-[type cons [(INT head) (cons tail)]]
-[def (INT ==) [(INT a) (INT b)] [if [- a b] 0 1]]
-[def (INT hastail) [(INT list)] [if [cons.tail list] 1 0]]
-[def (INT carry_guess) [(INT d) (INT base)] [/ d base]]
-[def (INT remainder) [(INT d) (INT base)] [% d base]]
-[def (INT carry_propagate) [(INT a) (INT b)] [+ 1 1]]
-[def (INT next_carry) [(INT base) (INT ds)]
- [carry_propagate [+ base 1] [cons.tail ds]]]
-[def (INT d_corrected) [(INT base) (INT ds)]
- [+ [cons.head ds] [next_carry base ds]]]
-
-[def (INT carry_propagate) [(INT base) (INT ds)] [
- if [== [carry_guess [cons.head ds] base] [/ [+ [cons.head ds] 9] base]]
- [cons [carry_guess [cons.head ds] base]
- [+ [remainder [cons.head ds] base] [next_carry base [cons.tail ds]]]]
- [cons [/ d_corrected base] [% d_corrected base]]
-]]
-
-[def (INT e) [(INT n)]
- [
-[def (INT inter_main) [] [debug_int [+ 1 1]]]