nendo 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/sample/exit.nnd ADDED
@@ -0,0 +1,2 @@
1
+ ;;-*- mode: nendo; syntax: scheme -*-;;
2
+ (exit)
data/sample/fact.nnd ADDED
@@ -0,0 +1,15 @@
1
+ #!/bin/sh
2
+ true; #-*- mode: nendo; syntax: scheme -*-;;
3
+ true; exec /usr/local/bin/nendo $0 $*
4
+
5
+ ;; fact
6
+ (define (fact n)
7
+ (if (zero? n)
8
+ 1
9
+ (* n #?=(fact (- n 1)))))
10
+
11
+ (print (fact 5))
12
+
13
+
14
+
15
+
@@ -0,0 +1,23 @@
1
+ #!/bin/sh
2
+ true; #-*- mode: nendo; syntax: scheme -*-;;
3
+ true; exec /usr/local/bin/nendo $0 $*
4
+
5
+ ;; FizzBuzz write in Nendo
6
+ (define (fizzbuzz max)
7
+ (map
8
+ (lambda (x)
9
+ (let ((x (+ x 1)))
10
+ (cond
11
+ ((= 0 (% x 15))
12
+ "FizzBuzz")
13
+ ((= 0 (% x 3))
14
+ "Fizz")
15
+ ((= 0 (% x 5))
16
+ "Buzz")
17
+ (else
18
+ x))))
19
+ (range max)))
20
+
21
+ (for-each
22
+ print
23
+ (fizzbuzz 30))
@@ -0,0 +1,11 @@
1
+ ;;-*- mode: nendo; syntax: scheme -*-;;
2
+
3
+ ;; -----------------
4
+ (enable-idebug)
5
+ (define debug-print-length 256)
6
+
7
+ "abc"
8
+ "a\nb"
9
+ "a\"b"
10
+ "abc\"abc\""
11
+ "abc\'abc\'"
data/sample/tak.nnd ADDED
@@ -0,0 +1,13 @@
1
+ ;;-*- mode: scheme; syntax: scheme -*-;;
2
+
3
+ ;; takeuchi function
4
+ (define (tak x y z)
5
+ (if (> x y)
6
+ (tak (tak (- x 1) y z)
7
+ (tak (- y 1) z x)
8
+ (tak (- z 1) x y))
9
+ y))
10
+
11
+ (print (tak 8 4 0))
12
+
13
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nendo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiyoka Nishiyama
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-16 00:00:00 +09:00
12
+ date: 2010-03-19 00:00:00 +09:00
13
13
  default_executable: nendo
14
14
  dependencies: []
15
15
 
@@ -23,13 +23,18 @@ extra_rdoc_files:
23
23
  - README
24
24
  files:
25
25
  - bin/nendo
26
+ - emacs/nendo-mode.el
26
27
  - lib/init.nnd
28
+ - lib/init.nndc
27
29
  - lib/nendo.rb
30
+ - sample/exit.nnd
31
+ - sample/fact.nnd
32
+ - sample/fizzbuzz1.nnd
33
+ - sample/scratch.nnd
34
+ - sample/tak.nnd
28
35
  - README
29
36
  has_rdoc: true
30
37
  homepage: http://github.com/kiyoka/nendo
31
- licenses: []
32
-
33
38
  post_install_message:
34
39
  rdoc_options:
35
40
  - --charset=UTF-8
@@ -50,9 +55,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
55
  requirements: []
51
56
 
52
57
  rubyforge_project:
53
- rubygems_version: 1.3.5
58
+ rubygems_version: 1.3.1
54
59
  signing_key:
55
- specification_version: 3
60
+ specification_version: 2
56
61
  summary: Nendo is a dialect of Lisp.
57
62
  test_files: []
58
63