Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: petitparser/lib/src/lisp/standard.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « petitparser/lib/src/lisp/parser.dart ('k') | petitparser/lib/src/reflection/iterable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: petitparser/lib/src/lisp/standard.dart
diff --git a/petitparser/lib/src/lisp/standard.dart b/petitparser/lib/src/lisp/standard.dart
deleted file mode 100644
index 7286c7991b7331f5ea70c14513fe03e5f83b66b9..0000000000000000000000000000000000000000
--- a/petitparser/lib/src/lisp/standard.dart
+++ /dev/null
@@ -1,68 +0,0 @@
-part of lisp;
-
-/**
- * The standard library.
- */
-class Standard {
-
- /** Imports the standard library into the [environment]. */
- static Environment import(Environment environment) {
- evalString(lispParser, environment, _standardLibrary);
- return environment;
- }
-
- /** A simple standard library, should be moved to external file. */
- static String _standardLibrary = """
-; null functions
-(define null '())
-(define (null? x) (= '() x))
-
-; booleans
-(define true (and))
-(define false (or))
-
-; list functions
-(define (length list)
- (if (null? list)
- 0
- (+ 1 (length (cdr list)))))
-
-(define (append list1 list2)
- (if (null? list1)
- list2
- (cons (car list1) (append (cdr list1) list2))))
-
-(define (list-head list index)
- (if (= index 0)
- (car list)
- (list-head
- (cdr list)
- (- index 1))))
-
-(define (list-tail list index)
- (if (= index 0)
- (cdr list)
- (list-tail
- (cdr list)
- (- index 1))))
-
-(define (for-each list proc)
- (while (not (null? list))
- (proc (car list))
- (set! list (cdr list))))
-
-(define (map list proc)
- (if (null? list)
- '()
- (cons (proc (car list))
- (map (cdr list) proc))))
-
-(define (inject list value proc)
- (if (null? list)
- value
- (inject
- (cdr list)
- (proc value (car list))
- proc)))
-""";
-}
« no previous file with comments | « petitparser/lib/src/lisp/parser.dart ('k') | petitparser/lib/src/reflection/iterable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698