A beginner-friendly REPL that combines:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; Copyright © 2022 Peter Monks | |
; | |
; This Source Code Form is subject to the terms of the Mozilla Public | |
; License, v. 2.0. If a copy of the MPL was not distributed with this | |
; file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
; | |
; SPDX-License-Identifier: MPL-2.0 | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; Copyright © 2016 Peter Monks | |
; | |
; This Source Code Form is subject to the terms of the Mozilla Public | |
; License, v. 2.0. If a copy of the MPL was not distributed with this | |
; file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
; | |
; SPDX-License-Identifier: MPL-2.0 | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; Copyright © 2024 Peter Monks | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 | |
; | |
; Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; Copyright © 2023 Peter Monks | |
; | |
; This Source Code Form is subject to the terms of the Mozilla Public | |
; License, v. 2.0. If a copy of the MPL was not distributed with this | |
; file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
; | |
; SPDX-License-Identifier: MPL-2.0 | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; Copyright © 2021 Peter Monks | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 | |
; | |
; Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; Copyright © 2021 Peter Monks | |
; | |
; This Source Code Form is subject to the terms of the Mozilla Public | |
; License, v. 2.0. If a copy of the MPL was not distributed with this | |
; file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
; | |
; SPDX-License-Identifier: MPL-2.0 | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; Copyright © 2020 Peter Monks | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 | |
; | |
; Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn file-seq | |
"A tree seq on java.io.Files that doesn't follow symlinks" | |
[dir] | |
(tree-seq | |
(fn [^java.io.File f] (and (.isDirectory f) (not (java.nio.file.Files/isSymbolicLink (.toPath f))))) | |
(fn [^java.io.File d] (seq (.listFiles d))) | |
dir)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bb | |
; | |
; Copyright © 2020 Peter Monks Some Rights Reserved | |
; | |
; This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. | |
; To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/ or send a | |
; letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. | |
; | |
; Inspired by https://github.com/ChrisPenner/wc - this code diverges from the remaining Haskell examples |
NewerOlder