Initial Commit
- initial default booting image
This commit is contained in:
13
support/testing/tests/package/test_guile/rootfs-overlay/root/fact.scm
Executable file
13
support/testing/tests/package/test_guile/rootfs-overlay/root/fact.scm
Executable file
@@ -0,0 +1,13 @@
|
||||
#! /usr/bin/env guile
|
||||
!#
|
||||
|
||||
; Adapted from "The Guile Reference Manual"
|
||||
; Section 4.3.4 Scripting Examples
|
||||
; https://doc.guix.gnu.org/guile/latest/en/html_node/Scripting-Examples.html
|
||||
|
||||
(define (fact n)
|
||||
(if (zero? n) 1
|
||||
(* n (fact (- n 1)))))
|
||||
|
||||
(display (fact (string->number (cadr (command-line)))))
|
||||
(newline)
|
||||
Reference in New Issue
Block a user