<commit_before><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--
penknife.html (part of Era)
Copyright 2013 <NAME>. Released under the MIT License.
-->
<title>Era Penknife demo</title>
<style type="text/css">
textarea { display: block; }
</style>
</head>
<body>
<p><a href="https://github.com/rocketnia/era"
    >View the Era project on GitHub.</a></p>
<p><a href="https://github.com/rocketnia/penknife"
    >View the old Penknife project on GitHub.</a></p>

<textarea id="code" cols="80" rows="24">
(nil)
(yep (nil))
(cons (nil) (nil))
(yep/nil) :cons (nil)
((fn x (cons x x)) (nil) (nil))
((fn x ((fn x (cons x x)) x x)) (nil) (nil))

(defval quote.list /fn x x)
(list quote.a quote.b)

(defval quote.curried-example /fn x /fn y (cons y x))
((curried-example (nil)) (yep/nil))

(let-list (a b) (list quote.foo quote.bar) a)
(let-list (a b) (list quote.foo quote.bar) (list a a b b a))

(if (nil) quote.foo quote.bar)
(if (yep/nil) quote.foo quote.bar)
(let-list (a b) (list quote.foo quote.bar)
  (if (nil)
    (list a a b)
    (list b b a)))
</textarea>
<button id="go">Execute</button>
<textarea id="result" disabled cols="80" rows="24"></textarea>

<script type="text/javascript" src="../src/era-misc.js"></script>
<script type="text/javascript" src="../src/era-reader.js"></script><commit_msg>In Penknife, found a bug in `let-list`, but didn't debug it yet.<commit_after><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--
penknife.html (part of Era)
Copyright 2013 <NAME>. Released under the MIT License.
-->
<title>Era Penknife demo</title>
<style type="text/css">
textarea { display: block; }
</style>
</head>
<body>
<p><a href="https://github.com/rocketnia/era"
    >View the Era project on GitHub.</a></p>
<p><a href="https://github.com/rocketnia/penknife"
    >View the old Penknife project on GitHub.</a></p>

<textarea id="code" cols="80" rows="24">
(nil)
(yep (nil))
(cons (nil) (nil))
(yep/nil) :cons (nil)
((fn x (cons x x)) (nil) (nil))
((fn x ((fn x (cons x x)) x x)) (nil) (nil))

(defval quote.list /fn x x)
(list quote.a quote.b)

(defval quote.curried-example /fn x /fn y (cons y x))
((curried-example (nil)) (yep/nil))

(let-list (a b) (list quote.foo quote.bar) a)
(let-list (a b) (list quote.foo quote.bar) (list a a b b a))

(if (nil) quote.foo quote.bar)
(if (yep/nil) quote.foo quote.bar)
(let-list (a b) (list quote.foo quote.bar)
  (if (nil)
    (list a a b)
    (list b b a)))

; TODO: Fix this. For some reason it returns #(nil) rather than nil.
( (fn args
    (let-list (a) args
      a))
  (nil))
</textarea>
<button id="go">Execute</button>
<textarea id="result" disabled cols="80" rows="24"></textarea>

<script type="text/javascript" src="../src/era-misc.js"></script>
<script type="text/javascript" src="../src/era-reader.js"></script>
{'fraction_non_alphanumeric': 0.21197991391678622, 'fraction_numerical': 0.009325681492109038, 'mean_word_length': 4.007181328545781, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7514880', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1083, 'n_words': 337}