liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

init.fnl (351B)


      1 (fn merge [table1 table2]
      2   (collect [k v (pairs table2) &into table1]
      3     k v))
      4 
      5 (fn split [sep string]
      6   (icollect [v (string.gmatch string (.. "([^" sep "]+)"))]
      7     v))
      8 
      9 (fn file-exists? [name]
     10   (match (io.open name :r)
     11     f (do (f:close) true)
     12     _ false))
     13 
     14 (fn system [s] (assert (os.execute s)))
     15 
     16 { : merge : split : file-exists? : system }