From 6b280423cde3f897a8590b0b90915002a0223e3d Mon Sep 17 00:00:00 2001 From: evanmm3 Date: Wed, 22 May 2024 16:15:39 -0500 Subject: [PATCH 01/12] list function examples --- examples/list.bend | 169 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 examples/list.bend diff --git a/examples/list.bend b/examples/list.bend new file mode 100644 index 00000000..daa2c236 --- /dev/null +++ b/examples/list.bend @@ -0,0 +1,169 @@ +############################## +# Author: Ematth, 2024 +############################## +### Singly-Linked List Type Definition: ### + +# type List: +# Cons { head, ~tail } +# Nil + +########################################### + +# List clear: +# List l -> list l +# clears all elements from list l. +# (this might be completely useless...) +List/clear = @l + [] + +# List concat: +# List l -> List l +# combines two lists (l1, l2) from left to right. +List/concat = @l1 @l2 + match l1 { + List/Cons: (List/Cons l1.head (List/concat l1.tail l2)) + List/Nil: l2 + } + +# List add_front: +# List l -> List l +# adds a non-List element e to the front of list l. +List/add_front = @l @e + match l { + List/Cons: (List/Cons e l) + List/Nil: (List/Cons e List/Nil) + } + +# List append (add_back): +# List l -> List l +# adds a non-list element e to the back of list l. +List/append = @l @e + (List/concat l (List/Cons e List/Nil)) + +# List reverse: +# List l -> List l +# reverses the order of elements in list l. +List/reverse/aux = @acc @l + match l { + List/Nil: acc + List/Cons: (List/reverse/aux (List/Cons l.head acc) l.tail) + } +List/reverse = @l + (List/reverse/aux [] l) + +# List length: +# List l -> uint +# returns the number of elements in list l. +List/len/aux = @acc @l + match l { + List/Nil: acc + List/Cons: (List/len/aux (+ acc 1) l.tail) + } +List/len = @l + (List/len/aux 0 l) + +# List count: +# List l -> Some s -> uint +# returns the number of instances of element s in list l. +List/count/aux = @acc @l @s + match l { + List/Nil: acc + List/Cons: use acc = switch (== l.head s) { + 0: acc; + _: (+ acc 1); + } + (List/count/aux acc l.tail s) + } +List/count = @l @s + (List/count/aux 0 l s) + +# List index: +# List l -> Some s +# returns the value of a specific list index i, or * if the index doesn't exist. +List/index = @l @i + match l { + List/Cons: + switch i { + 0: l.head + _: (List/index l.tail (- i 1)) + } + List/Nil: * + } + +# List pop_front: +# List l -> (List l, Some s) +# removes the first item from the front of list l, or [] if the list is empty. +# Both the popped element and the new list are returned. +List/pop_front = @l + match l { + List/Cons: (l.head, l.tail) + List/Nil: [] + } + +# List pop_back: +# List l -> List l +# removes the first item from the back of list l. +List/pop_back/aux = @acc @l + match l { + List/Nil: List/Nil + List/Cons: + use x = switch acc { + 0: * + _: l.head + } + use y = switch acc { + 0: List/Nil + 1: List/Nil + _: l.tail + } + (List/Cons x (List/pop_back/aux (- acc 1) y)) + } +List/pop_back = @l + switch (- (List/len l) 1) { + 0: [] + _: (List/pop_back/aux (- (List/len l) 1) l) + } + +# List remove: +# List l -> Some s -> List l +# removes the first occurence of element e from list l. +List/remove = @l @s + match l { + List/Cons: + switch (== l.head s) { + 0: (List/Cons l.head (List/remove l.tail s)) + _: l.tail + } + List/Nil: List/Nil + } + +# List split: +# list l -> uint i -> (List l, list l) +# splits list l into two lists (l1, l2) at index i. +# the second list takes the element at index i during the split. +List/split/aux = @acc @l @i + match l { + List/Cons: + switch i { + 0: (acc, l) + _: (List/split/aux (List/append acc l.head) l.tail (- i 1)) + } + List/Nil: * + } +List/split = @l @i + (List/split/aux [] l i) + +################################# + +#main = (List/split [1, 2, 3, 4, 5, 6, 7] 3) +#main = (List/remove [1, 2, 1, 3] 1) +#main = (List/pop_back []) +#main = (List/pop_front [1, 2, 3]) +#main = (List/index [1, 2, 3, 4, 5] 4) +#main = (List/clear [0, 2, 3]) +#main = (List/count [1, 2, 3, 3, 3, 4, 4, 5, 3, 1000] 3) +#main = (List/len [1, 2, 3, 4, 4, 4]) +#main = (List/reverse [1, 2, 3, 4, 5]) +#main = (List/append [1, 2] 3) +#main = (List/add_front [2, 3] 1) +#main = (List/concat [1, 2] [3, 4]) \ No newline at end of file From 3cfddb929fd0e8018c46b31fb558209cde413573 Mon Sep 17 00:00:00 2001 From: "Evan M. Matthews" Date: Wed, 22 May 2024 17:40:34 -0400 Subject: [PATCH 02/12] Update examples/list.bend Co-authored-by: Nicolas Abril --- examples/list.bend | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/list.bend b/examples/list.bend index daa2c236..68cd96cf 100644 --- a/examples/list.bend +++ b/examples/list.bend @@ -3,6 +3,8 @@ ############################## ### Singly-Linked List Type Definition: ### +# The List type is builtin, so we don't need to declare it. +# But this is how it's defined in the builtins file. # type List: # Cons { head, ~tail } # Nil From 475138a596239e4c25555bc74fae5d3af67f241e Mon Sep 17 00:00:00 2001 From: "Evan M. Matthews" Date: Wed, 22 May 2024 17:40:50 -0400 Subject: [PATCH 03/12] Update examples/list.bend Co-authored-by: Nicolas Abril --- examples/list.bend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/list.bend b/examples/list.bend index 68cd96cf..a6a21a73 100644 --- a/examples/list.bend +++ b/examples/list.bend @@ -6,8 +6,8 @@ # The List type is builtin, so we don't need to declare it. # But this is how it's defined in the builtins file. # type List: -# Cons { head, ~tail } # Nil +# Cons { head, ~tail } ########################################### From b41a88df7b87f48e95629eca02c831e61dda98e1 Mon Sep 17 00:00:00 2001 From: evanmm3 Date: Wed, 22 May 2024 17:00:52 -0500 Subject: [PATCH 04/12] fixed List/len func --- examples/list.bend | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/list.bend b/examples/list.bend index a6a21a73..11e743c2 100644 --- a/examples/list.bend +++ b/examples/list.bend @@ -56,16 +56,14 @@ List/reverse = @l # List length: # List l -> uint # returns the number of elements in list l. -List/len/aux = @acc @l - match l { - List/Nil: acc - List/Cons: (List/len/aux (+ acc 1) l.tail) - } List/len = @l - (List/len/aux 0 l) + match l { + List/Nil: 0 + List/Cons: (+ 1 (List/len l.tail)) + } # List count: -# List l -> Some s -> uint +# List l -> uint -> uint # returns the number of instances of element s in list l. List/count/aux = @acc @l @s match l { @@ -164,7 +162,7 @@ List/split = @l @i #main = (List/index [1, 2, 3, 4, 5] 4) #main = (List/clear [0, 2, 3]) #main = (List/count [1, 2, 3, 3, 3, 4, 4, 5, 3, 1000] 3) -#main = (List/len [1, 2, 3, 4, 4, 4]) +main = (List/len [1, 2, 3, 4, 4, 4]) #main = (List/reverse [1, 2, 3, 4, 5]) #main = (List/append [1, 2] 3) #main = (List/add_front [2, 3] 1) From 62a39906dae7a9dadd3090bd58c0d3f95d1d2aa7 Mon Sep 17 00:00:00 2001 From: evanmm3 Date: Wed, 22 May 2024 17:06:29 -0500 Subject: [PATCH 05/12] simplified logic for List/count --- examples/list.bend | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/list.bend b/examples/list.bend index 11e743c2..f2a02ac4 100644 --- a/examples/list.bend +++ b/examples/list.bend @@ -64,18 +64,16 @@ List/len = @l # List count: # List l -> uint -> uint -# returns the number of instances of element s in list l. -List/count/aux = @acc @l @s +# returns the number of instances of uint s in list l. +List/count = @l @s match l { - List/Nil: acc + List/Nil: 0 List/Cons: use acc = switch (== l.head s) { 0: acc; _: (+ acc 1); } - (List/count/aux acc l.tail s) + (List/count acc l.tail s) } -List/count = @l @s - (List/count/aux 0 l s) # List index: # List l -> Some s @@ -162,7 +160,7 @@ List/split = @l @i #main = (List/index [1, 2, 3, 4, 5] 4) #main = (List/clear [0, 2, 3]) #main = (List/count [1, 2, 3, 3, 3, 4, 4, 5, 3, 1000] 3) -main = (List/len [1, 2, 3, 4, 4, 4]) +#main = (List/len [1, 2, 3, 4, 4, 4]) #main = (List/reverse [1, 2, 3, 4, 5]) #main = (List/append [1, 2] 3) #main = (List/add_front [2, 3] 1) From 7fd6b153a2ea2bc07b12879c9bb87c8bc7c11be1 Mon Sep 17 00:00:00 2001 From: evanmm3 Date: Fri, 24 May 2024 15:28:38 -0500 Subject: [PATCH 06/12] fix for List/count, added List/sum --- examples/list.bend | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/examples/list.bend b/examples/list.bend index f2a02ac4..0359b2a5 100644 --- a/examples/list.bend +++ b/examples/list.bend @@ -42,6 +42,15 @@ List/add_front = @l @e List/append = @l @e (List/concat l (List/Cons e List/Nil)) +# list sum: +# List l -> uint +# returns the sum of all items in the list +List/sum = @l + match l { + List/Cons: (+ l.head (List/sum l.tail)) + List/Nil: 0 + } + # List reverse: # List l -> List l # reverses the order of elements in list l. @@ -65,15 +74,17 @@ List/len = @l # List count: # List l -> uint -> uint # returns the number of instances of uint s in list l. -List/count = @l @s +List/count/aux = @acc @l @s match l { - List/Nil: 0 + List/Nil: acc List/Cons: use acc = switch (== l.head s) { 0: acc; _: (+ acc 1); } - (List/count acc l.tail s) + (List/count/aux acc l.tail s) } +List/count = @l @s + (List/count/aux 0 l s) # List index: # List l -> Some s @@ -153,6 +164,7 @@ List/split = @l @i ################################# +#main = (List/sum [1, 2, 3]) #main = (List/split [1, 2, 3, 4, 5, 6, 7] 3) #main = (List/remove [1, 2, 1, 3] 1) #main = (List/pop_back []) From 3324a538809d7e0c092f477dc432bf1f4e567f68 Mon Sep 17 00:00:00 2001 From: "Evan M. Matthews" Date: Wed, 29 May 2024 12:29:51 -0400 Subject: [PATCH 07/12] Update List/pop_back Co-authored-by: Nicolas Abril --- examples/list.bend | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/examples/list.bend b/examples/list.bend index 0359b2a5..0c8dc543 100644 --- a/examples/list.bend +++ b/examples/list.bend @@ -111,27 +111,10 @@ List/pop_front = @l # List pop_back: # List l -> List l -# removes the first item from the back of list l. -List/pop_back/aux = @acc @l - match l { - List/Nil: List/Nil - List/Cons: - use x = switch acc { - 0: * - _: l.head - } - use y = switch acc { - 0: List/Nil - 1: List/Nil - _: l.tail - } - (List/Cons x (List/pop_back/aux (- acc 1) y)) - } -List/pop_back = @l - switch (- (List/len l) 1) { - 0: [] - _: (List/pop_back/aux (- (List/len l) 1) l) - } +# removes and discards the the last item of the list +List/pop_back (List/Nil) = List/Nil +List/pop_back (List/Cons x List/Nil) = List/Nil +List/pop_back (List/Cons head tail) = (List/Cons head (List/pop_back tail)) # List remove: # List l -> Some s -> List l From 7955dd9ce1905c2686345b86325ac47c00bc1219 Mon Sep 17 00:00:00 2001 From: "Evan M. Matthews" Date: Wed, 29 May 2024 12:30:33 -0400 Subject: [PATCH 08/12] Update List/append with stored value i-1 Co-authored-by: Nicolas Abril --- examples/list.bend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/list.bend b/examples/list.bend index 0c8dc543..ffa068a0 100644 --- a/examples/list.bend +++ b/examples/list.bend @@ -138,7 +138,7 @@ List/split/aux = @acc @l @i List/Cons: switch i { 0: (acc, l) - _: (List/split/aux (List/append acc l.head) l.tail (- i 1)) + _: (List/split/aux (List/append acc l.head) l.tail i-1) } List/Nil: * } From 720e748d254f0519bafa0836447d910f1df2f519 Mon Sep 17 00:00:00 2001 From: evanmm3 Date: Wed, 29 May 2024 14:21:55 -0500 Subject: [PATCH 09/12] fixed List/pop_front, added List/head --- .vscode/settings.json | 5 ++++ examples/graphs.bend | 65 +++++++++++++++++++++++++++++++++++++++++++ examples/list.bend | 56 ++++++++++++++++++++++--------------- 3 files changed, 103 insertions(+), 23 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 examples/graphs.bend diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..b242572e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "main" + ] +} \ No newline at end of file diff --git a/examples/graphs.bend b/examples/graphs.bend new file mode 100644 index 00000000..51c087ab --- /dev/null +++ b/examples/graphs.bend @@ -0,0 +1,65 @@ +############################## +# Author: Ematth, 2024 +############################## + +### Graph Definition: ### + +object Node { value } +object Edge { weight, node1, node2 } +object Pair { x, y } + +type Graph: + Pair + Nil + + + +######################### + +# REMOVE WHEN IMPORTING GETS ADDED +# List/len = @l +# match l { +# List/Nil: 0 +# List/Cons: (+ 1 (List/len l.tail)) +# } + +# # REMOVE WHEN IMPORTING GETS ADDED +# List/sum = @l +# match l { +# List/Cons: (+ l.head (List/sum l.tail)) +# List/Nil: 0 +# } + +# # Graph: count nodes +# # Graph g -> uint +# def Graph/count_nodes(g): +# open Graph: g +# return List/len(g.nodes) + +# # Graph: count edges +# # Graph g -> uint +# def Graph/count_edges(g): +# open Graph: g +# return List/len(g.edges) + +# def Graph/sum_nodes(g): +# open Graph: g +# match g.nodes: +# case List/Cons: +# return List/sum(g.nodes) +# case List/Nil: +# return 0 + + +# ########################################### + +def main: + + # (a, b, c) = [Node(1), Node(2), Node(3)] + # nodes = [a, b, c] + # edges = [Edge(3, a, b), Edge(7, b, c), Edge(5, a, c)] + + # g = Graph(nodes, edges) + a = Pair(3, 5) + open Pair: a + return (a.x, a.y) diff --git a/examples/list.bend b/examples/list.bend index ffa068a0..90827670 100644 --- a/examples/list.bend +++ b/examples/list.bend @@ -13,8 +13,7 @@ # List clear: # List l -> list l -# clears all elements from list l. -# (this might be completely useless...) +# clears all elements from list l. This is equivalent to initializing an empty list. List/clear = @l [] @@ -44,7 +43,7 @@ List/append = @l @e # list sum: # List l -> uint -# returns the sum of all items in the list +# returns the sum of all items in the list. List/sum = @l match l { List/Cons: (+ l.head (List/sum l.tail)) @@ -73,7 +72,7 @@ List/len = @l # List count: # List l -> uint -> uint -# returns the number of instances of uint s in list l. +# returns the number of instances of Some s in list l. List/count/aux = @acc @l @s match l { List/Nil: acc @@ -94,24 +93,33 @@ List/index = @l @i List/Cons: switch i { 0: l.head - _: (List/index l.tail (- i 1)) + _: (List/index l.tail (i-1)) } List/Nil: * } +# List head: +# List l -> Some s +# returns the first item in the list, or [] if the list is empty. +List/head = @l + match l { + List/Cons: l.head + List/Nil: [] + } + # List pop_front: -# List l -> (List l, Some s) -# removes the first item from the front of list l, or [] if the list is empty. -# Both the popped element and the new list are returned. +# List l -> List l +# removes and discards the first item of list l. +# The new list is returned, or [] if the list is empty. List/pop_front = @l match l { - List/Cons: (l.head, l.tail) + List/Cons: l.tail List/Nil: [] } # List pop_back: # List l -> List l -# removes and discards the the last item of the list +# removes and discards the the last item of list l. List/pop_back (List/Nil) = List/Nil List/pop_back (List/Cons x List/Nil) = List/Nil List/pop_back (List/Cons head tail) = (List/Cons head (List/pop_back tail)) @@ -147,16 +155,18 @@ List/split = @l @i ################################# -#main = (List/sum [1, 2, 3]) -#main = (List/split [1, 2, 3, 4, 5, 6, 7] 3) -#main = (List/remove [1, 2, 1, 3] 1) -#main = (List/pop_back []) -#main = (List/pop_front [1, 2, 3]) -#main = (List/index [1, 2, 3, 4, 5] 4) -#main = (List/clear [0, 2, 3]) -#main = (List/count [1, 2, 3, 3, 3, 4, 4, 5, 3, 1000] 3) -#main = (List/len [1, 2, 3, 4, 4, 4]) -#main = (List/reverse [1, 2, 3, 4, 5]) -#main = (List/append [1, 2] 3) -#main = (List/add_front [2, 3] 1) -#main = (List/concat [1, 2] [3, 4]) \ No newline at end of file +def main: + return List/head([5, 4, 3, 2, 1]) +# return List/sum([1, 2, 3]) +# return List/split([1, 2, 3, 4, 5, 6, 7], 3) +# return List/remove([1, 2, 1, 3], 1) +# return List/pop_back([1, 2, 3, 4]) +# return List/pop_front([1, 2, 3]) +# return List/index([5, 3, 6, 8, 2], 0) +# return List/clear([0, 2, 3]) +# return List/count([1, 2, 3, 3, 3, 4, 4, 5, 3, 1000], 4) +# return List/len([1, 2, 3, 4, 4, 4]) +# return List/reverse([1, 2, 3, 4, 5]) +# return List/append([1, 2], 3) +# return List/add_front([2, 3], 1) +# return List/concat([1, 2], [3, 4]) \ No newline at end of file From 8d5c768fc3f56e59923e7cd9a962394c639d0bda Mon Sep 17 00:00:00 2001 From: "Evan M. Matthews" Date: Wed, 29 May 2024 15:55:12 -0400 Subject: [PATCH 10/12] Delete graphs from commit Whoops, that's not supposed to be committed yet. --- examples/graphs.bend | 65 -------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 examples/graphs.bend diff --git a/examples/graphs.bend b/examples/graphs.bend deleted file mode 100644 index 51c087ab..00000000 --- a/examples/graphs.bend +++ /dev/null @@ -1,65 +0,0 @@ -############################## -# Author: Ematth, 2024 -############################## - -### Graph Definition: ### - -object Node { value } -object Edge { weight, node1, node2 } -object Pair { x, y } - -type Graph: - Pair - Nil - - - -######################### - -# REMOVE WHEN IMPORTING GETS ADDED -# List/len = @l -# match l { -# List/Nil: 0 -# List/Cons: (+ 1 (List/len l.tail)) -# } - -# # REMOVE WHEN IMPORTING GETS ADDED -# List/sum = @l -# match l { -# List/Cons: (+ l.head (List/sum l.tail)) -# List/Nil: 0 -# } - -# # Graph: count nodes -# # Graph g -> uint -# def Graph/count_nodes(g): -# open Graph: g -# return List/len(g.nodes) - -# # Graph: count edges -# # Graph g -> uint -# def Graph/count_edges(g): -# open Graph: g -# return List/len(g.edges) - -# def Graph/sum_nodes(g): -# open Graph: g -# match g.nodes: -# case List/Cons: -# return List/sum(g.nodes) -# case List/Nil: -# return 0 - - -# ########################################### - -def main: - - # (a, b, c) = [Node(1), Node(2), Node(3)] - # nodes = [a, b, c] - # edges = [Edge(3, a, b), Edge(7, b, c), Edge(5, a, c)] - - # g = Graph(nodes, edges) - a = Pair(3, 5) - open Pair: a - return (a.x, a.y) From b33e857df4eab2dde1a6f2089531c33c2b4aad6a Mon Sep 17 00:00:00 2001 From: evanmm3 Date: Fri, 31 May 2024 09:03:24 -0500 Subject: [PATCH 11/12] remove .vscode from future commits --- .gitignore | 3 ++- .vscode/settings.json | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 67994158..c82c5297 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target *.snap.new .out.hvm -.DS_Store \ No newline at end of file +.DS_Store +.vscode \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index b242572e..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "githubPullRequests.ignoredPullRequestBranches": [ - "main" - ] -} \ No newline at end of file From 2140f7a3a7744664a658739c14f6422b1d7db95f Mon Sep 17 00:00:00 2001 From: evanmm3 Date: Fri, 31 May 2024 09:09:01 -0500 Subject: [PATCH 12/12] insta test/review completed --- tests/snapshots/examples__list.bend.snap | 5 +++++ tests/snapshots/run_file__basic_num_ops.bend.snap | 4 ++-- tests/snapshots/run_file__ops.bend.snap | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 tests/snapshots/examples__list.bend.snap diff --git a/tests/snapshots/examples__list.bend.snap b/tests/snapshots/examples__list.bend.snap new file mode 100644 index 00000000..c22021d0 --- /dev/null +++ b/tests/snapshots/examples__list.bend.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: examples/list.bend +--- +5 diff --git a/tests/snapshots/run_file__basic_num_ops.bend.snap b/tests/snapshots/run_file__basic_num_ops.bend.snap index 0825f8bd..fd68f633 100644 --- a/tests/snapshots/run_file__basic_num_ops.bend.snap +++ b/tests/snapshots/run_file__basic_num_ops.bend.snap @@ -3,7 +3,7 @@ source: tests/golden_tests.rs input_file: tests/golden_tests/run_file/basic_num_ops.bend --- NumScott: -[30, 10, 200, 2, 0, 30, 0, 30, 0, 1, 0, 1, 65535, +30, +10, +200, +2, +0, +30, +0, +30, +0, +1, +0, +1, 65535, -30, -10, +200, +2, +0, +26, -28, -2, +0, +1, +1, +0, 65535, +10, +30, -200, -2, +0, -30, +20, -10, +0, +1, +0, +1, 65535, -10, -30, -200, -2, +0, -26, +8, -18, +0, +1, +1, +0, 65535, 30.000, 10.000, 200.000, 2.000, 0.000, 10240007340032.000, 1.107, 0.769, 0, 1, 0, 1, 65535, -30.000, -10.000, 200.000, 2.000, -0.000, 0.000, -2.034, NaN, 0, 1, 1, 0, 65535, 10.000, 30.000, -200.000, -2.000, 0.000, 0.000, 2.034, NaN, 0, 1, 0, 1, 65535, -10.000, -30.000, -200.000, -2.000, -0.000, 10240007340032.000, -1.107, NaN, 0, 1, 1, 0] +[30, 10, 200, 2, 0, 30, 0, 30, 0, 1, 0, 1, 65535, +30, +10, +200, +2, +0, +30, +0, +30, 0, 1, 0, 1, 65535, -30, -10, +200, +2, +0, +26, -28, -2, 0, 1, 1, 0, 65535, +10, +30, -200, -2, +0, -30, +20, -10, 0, 1, 0, 1, 65535, -10, -30, -200, -2, +0, -26, +8, -18, 0, 1, 1, 0, 65535, 30.000, 10.000, 200.000, 2.000, 0.000, 10240007340032.000, 1.107, 0.769, 0, 1, 0, 1, 65535, -30.000, -10.000, 200.000, 2.000, -0.000, 0.000, -2.034, NaN, 0, 1, 1, 0, 65535, 10.000, 30.000, -200.000, -2.000, 0.000, 0.000, 2.034, NaN, 0, 1, 0, 1, 65535, -10.000, -30.000, -200.000, -2.000, -0.000, 10240007340032.000, -1.107, NaN, 0, 1, 1, 0] Scott: -[30, 10, 200, 2, 0, 30, 0, 30, 0, 1, 0, 1, 65535, +30, +10, +200, +2, +0, +30, +0, +30, +0, +1, +0, +1, 65535, -30, -10, +200, +2, +0, +26, -28, -2, +0, +1, +1, +0, 65535, +10, +30, -200, -2, +0, -30, +20, -10, +0, +1, +0, +1, 65535, -10, -30, -200, -2, +0, -26, +8, -18, +0, +1, +1, +0, 65535, 30.000, 10.000, 200.000, 2.000, 0.000, 10240007340032.000, 1.107, 0.769, 0, 1, 0, 1, 65535, -30.000, -10.000, 200.000, 2.000, -0.000, 0.000, -2.034, NaN, 0, 1, 1, 0, 65535, 10.000, 30.000, -200.000, -2.000, 0.000, 0.000, 2.034, NaN, 0, 1, 0, 1, 65535, -10.000, -30.000, -200.000, -2.000, -0.000, 10240007340032.000, -1.107, NaN, 0, 1, 1, 0] +[30, 10, 200, 2, 0, 30, 0, 30, 0, 1, 0, 1, 65535, +30, +10, +200, +2, +0, +30, +0, +30, 0, 1, 0, 1, 65535, -30, -10, +200, +2, +0, +26, -28, -2, 0, 1, 1, 0, 65535, +10, +30, -200, -2, +0, -30, +20, -10, 0, 1, 0, 1, 65535, -10, -30, -200, -2, +0, -26, +8, -18, 0, 1, 1, 0, 65535, 30.000, 10.000, 200.000, 2.000, 0.000, 10240007340032.000, 1.107, 0.769, 0, 1, 0, 1, 65535, -30.000, -10.000, 200.000, 2.000, -0.000, 0.000, -2.034, NaN, 0, 1, 1, 0, 65535, 10.000, 30.000, -200.000, -2.000, 0.000, 0.000, 2.034, NaN, 0, 1, 0, 1, 65535, -10.000, -30.000, -200.000, -2.000, -0.000, 10240007340032.000, -1.107, NaN, 0, 1, 1, 0] diff --git a/tests/snapshots/run_file__ops.bend.snap b/tests/snapshots/run_file__ops.bend.snap index 51ac5efc..961c54e6 100644 --- a/tests/snapshots/run_file__ops.bend.snap +++ b/tests/snapshots/run_file__ops.bend.snap @@ -3,7 +3,7 @@ source: tests/golden_tests.rs input_file: tests/golden_tests/run_file/ops.bend --- NumScott: -[1, 1, +1, +1, 1] +[1, 1, 1, 1, 1] Scott: -[1, 1, +1, +1, 1] +[1, 1, 1, 1, 1]