From 0f29e94ee3c05f84f24efd42693bba5debde218f Mon Sep 17 00:00:00 2001
From: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Sat, 20 Jul 2019 16:02:52 +0900
Subject: [PATCH] Updated fs example

---
 examples/fs.lisp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/examples/fs.lisp b/examples/fs.lisp
index 0c624bb..44eac10 100644
--- a/examples/fs.lisp
+++ b/examples/fs.lisp
@@ -4,8 +4,11 @@
   (def files 
     (ls 
       (folder))) 
-  ; print files count 
+  ; pick a random file 
+  (def random-index 
+    (floor 
+      (random 
+        (len files)))) 
+  ; print random file name
   (echo 
-    (concat "Current folder: " 
-      (folder) " contains " 
-      (len files) " files"))))
\ No newline at end of file
+    (get files random-index)))
\ No newline at end of file