How to resolve the algorithm Unix/ls step by step in the EchoLisp programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Unix/ls step by step in the EchoLisp programming language
Table of Contents
Problem Statement
Write a program that will list everything in the current folder, similar to:
The output must be sorted, but printing extended details and producing multi-column output is not required.
For the list of paths:
When the program is executed in /foo
, it should print:
and when the program is executed in /foo/bar
, it should print:
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Unix/ls step by step in the EchoLisp programming language
Source code in the echolisp programming language
;; ls of stores (kind of folders)
(for-each writeln (list-sort < (local-stores))) →
AGES
NEMESIS
info
objects.dat
reader
system
user
words
;; ls of "NEMESIS" store
(for-each writeln (local-keys "NEMESIS")) →
Alan
Glory
Jonah
You may also check:How to resolve the algorithm JSON step by step in the Ol programming language
You may also check:How to resolve the algorithm Greedy algorithm for Egyptian fractions step by step in the Factor programming language
You may also check:How to resolve the algorithm FTP step by step in the C programming language
You may also check:How to resolve the algorithm Four bit adder step by step in the Clojure programming language
You may also check:How to resolve the algorithm Wieferich primes step by step in the Julia programming language