Skip to content

Commit 5edcb35

Browse files
committed
use temstore instead of writefile
Fixes http://arclanguage.org/item?id=15664
1 parent bd23436 commit 5edcb35

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arc.arc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,15 @@
13911391
(def temloadall (tem file)
13921392
(w/infile i file (drain:temread tem i)))
13931393

1394+
(def temstore(tem val file)
1395+
(let fields (coerce val 'list)
1396+
(each (k v) (if acons.tem
1397+
tem
1398+
templates*.tem)
1399+
(if (~assoc k fields)
1400+
(push (list k nil) fields)))
1401+
(writefile fields file)))
1402+
13941403
(def number (n) (in (type n) 'int 'num))
13951404

13961405
(def since (t1) (- (seconds) t1))

0 commit comments

Comments
 (0)