<commit_before>##Bar graph
```
(let [x0 y0 sep] [28 28 60]
(svg 
  (map
    (\[i j] (rect 'red' (+ x0 (mult i sep)) (+ y0 (- 400 (mult 100 j))) 50 (mult 100 j)))
    [[0 2] [1 4] [2 1]])))
```

Sync.evalTrace doesn't support - as an operation?
Shouldn't parse until button is pushed

This code:
```
(let [x0 y0 sep] [28 28 60]
(svg 
  (map
    (\[i j] (rect 'red' (+ x0 (mult i sep)) (+ y0 (minus 400 (mult 100 j))) 50 (mult 100 j)))
    (zip
        [0 1 2]
        [2 4 1]))))
```
Leads to a 'too much recursion' error.

Helper functions:
```
(let indexedzip (\xs (indexedzip_ 0 xs)))
(letrec indexedzip_ (\acc xs (case xs 
    ([x|xx] [[acc x]| (indexedzip_ (+ acc 1) xx))
    (_      []                                  )
    )))
```

```
let [x0 y0 sep] [28 28 60]
(svg 
  (map
    (\[i j] (rect 'red' (+ x0 (mult i sep)) (+ y0 (minus 400 (mult 100 j))) 50 (mult 100 j)))
    (indexedzip [2 4 1])))
```

All together?
```
(let indexedzip (\xs (indexedzip_ 0 xs))
(letrec indexedzip_ (\acc xs (case xs 
    ([x|xx] [[acc x]| (indexedzip_ (+ acc 1) xx)])
    (_      []                                  )
    ))
0))

let [x0 y0 sep] [28 28 60]

(svg 
  (map
    (\[i j] (rect 'red' (+ x0 (mult i sep)) (+ y0 (minus 400 (mult 100 j))) 50 (mult 100 j)))
    (indexedzip [2 4 1])))
```

Need to look into how to define functions at the top of the input.

```
(letrec indexedzip_
  (\(acc xs)
    (case xs
      ([x | xx] [[acc x] | (indexedzip_ (+ acc 1) xx)])
      (_ [])))
(let indexedzip (\xs (indexedzip_ 0 xs))
(let [x0 y0 sep] [28 28 60]
  (svg 
    (map
      (\[i j]
        (rect
          'red'
          (+ x0 (mult i sep))
          (+ y0 (minus 400 (mult 100 j)))
          50
          (mult 100 j)))
      (indexedzip  [2 4 1]))))))
```
The above code runs, but gives an inexhaustive pattern match error in Lang.

Catching parse errors would be nice - highlighting problematic spots would be even better.

```
(letrec indexedzip_
 (\(acc xs)
    (case xs
      ([x | xx] [[acc x] | (indexedzip_ (+ acc 1) xx)])
      (_ [])))
(let indexedzip (\xs (indexedzip_ 0 xs))
(let xaxis (rect 'black' (- x0 50) (+ y0 400) 300 10)
(let yaxis (rect 'black' (- x0 50) y0 10 300)
(let bars (map (\[i j] (rect 'red' (+ x0 (* i sep)) (+ y0 (- 400 (* 100 j))) 50 (* 100 j))) (indexedzip [2 4 1]))
(let [x0 y0 sep] [28 28 60]
  (svg ([xaxis | yaxis]))))))))
```

```
(let node (\[x y] (circle 'blue' x y 20))
(let edge (\[[x y] [i j]] (line 'green' x y i j))
(letrec genpairs (\xs 
  (case xs 
    ([x | y | xx] [[x y] | (genpairs [x | xx]) | (genpairs ([y | xx]))]) 
    (_ [])
  )
)
(svg (map edge 
  (genpairs [[100 200] [200 300]])
  )
)
```

The line function isn't working quite yet.<commit_msg>Graph example in progress<commit_after>##Bar graph

```
(letrec indexedzip_
  (\(acc xs)
    (case xs
      ([x | xx] [[acc x] | (indexedzip_ (+ acc 1) xx)])
      (_ [])))
(let indexedzip (\xs (indexedzip_ 0 xs))
(let [x0 y0 sep] [28 28 60]
  (svg 
    (map
      (\[i j]
        (rect
          'red'
          (+ x0 (mult i sep))
          (+ y0 (minus 400 (mult 100 j)))
          50
          (mult 100 j)))
      (indexedzip  [2 4 1]))))))
```

```
(letrec indexedzip_
  (\(acc xs)
    (case xs
      ([x | xx] [[acc x] | (indexedzip_ (+ acc 1) xx)])
      (_ [])))
(let indexedzip (\xs (indexedzip_ 0 xs))
(let [x0 y0 sep] [28 28 60]
(let xaxis (rect 'black' (- x0 8) (+ y0 400) 300 10)
(let yaxis (rect 'black' (- x0 8) y0 10 300)
(let bars
  (map
    (\[i j] (rect 'red' (+ x0 (* i sep)) (+ y0 (- 400 (* 100 j))) 50 (* 100 j)))
    (indexedzip  [2 4 1]))
  (svg  [xaxis | yaxis | bars])))))))
```

##Graph (nodes and edges)

```
(let node (\[x y] (circle 'blue' x y 20))
(let edge (\[[x y] [i j]] (line_ x y i j))
(letrec genpairs (\xs 
  (case xs 
    ([x y | xx] [[x y] (append (genpairs [x | xx]) (genpairs ([y | xx])))]) 
    (_ [])
  )
)
(let pts [[100 200] [200 300]]
(let edges (map edge (genpairs pts))
(let nodes (map node pts)
(svg (append edges nodes))
))))))
```

The line function isn't working quite yet.

```
(let (edge (\[[x y] [i j]] (line 'green' x y i j))
(let lin (edge [[100 200] [200 300]])
(svg [lin]))))
```

```
(let node (\[x y] (circle 'blue' x y 20))
(let edge (\[[x y] [i j]] (line 'green' x y i j))
(letrec genpairs (\xs 
  (case xs 
    ([x | y | xx] [[x y] | (genpairs [x | xx]) | (genpairs ([y | xx]))]) 
    (_ [])
  )
)
(let pts [[100 200] [200 300]]
(let edges (map edge (genpairs pts))

(svg [])
)))))
```
{'fraction_non_alphanumeric': 0.21096382835317906, 'fraction_numerical': 0.06852392720736913, 'mean_word_length': 2.375284306292646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4090820', 'n_tokens_mistral': 2110, 'n_tokens_neox': 1747, 'n_words': 673}