National Scheme (1): Digital games

Source: Internet
Author: User

Just saw two words, feel good, share to everyone:

1. The user's problem is our problem

2. Do what the user wants

(Define ADD1 (lambda (x) (+ 1 x))) (Define SUB1 (lambda (x) (-X 1))) (ADD1 67) (sub1 5) (Sub1 0) (zero? 22) (Define Addup (Lambda (tup) (Cond ((null? tup) 0) (Else (+ (car tup) (Addup (Cdr tup)))))) (Addup ' (3 4 5)) (Define * (lambda (x y) (Cond (EQ. 1 x) y) (Else (+ y (* (sub1 x) y)))) (* 3 9) (Define tup+ (lambda (tup1 tup2) (cond ((null? tup1) ()) (Else (cons (+ (car tup1) (car tup2)) (tup+ (Cdr t    Up1) (Cdr tup2)))) (Tup+ ' (2 3 4 5) ' (5 4 3 2)) (Define > (lambda (x y) (Cond (zero x) #f) ((zero y) #t) (Else (> (sub1 x) (Sub1 y))))) (> 4 3) (> 3 3) (> 3 4) (Define < (lambda (x y) (cond (zero y) #f) ((zero X) #t) (Else < (Sub1 x) (Sub1 y)))) (< 3 3) (< 4 3) (< 3 4) (define = (lambda (x y) (Cond (> x y) #f) ((< x y) #f) (else #t))) (= 3 4) (= 3 3) (= 4 3) (Define EXPT (lambda (x y) (Cond ((zero y) 1) (Else (* x (expt x (sub1 y))))) (EXPT 5 3)(Define/(lambda (x y) (Cond ((< x y) 0) (Else (ADD1 (/(-X y) y)))) (/10 2) (define Length (lambda (LAT) (cond ((NULL) LAT) 0) (Else (add1 (length (CDR)))))) (Length ' (Good Hello)) (Define pick (lambda (n LAT) (Cond (EQ. N 1) (Car lat)) (Else (pick (sub1 N) (Cdr lat))))) (Pick 3 ' (hotdogs with hot mustard)) (Define No-nums (list) (Cond ((null? list) ()) (number? (Car list))      (No-nums (CDR list))) (Else (Cons (No-nums (Cdr list))))) (No-nums ' (5 pears 6 prunes 9 dates)) (Define All-nums (lambda (LAT) (cond () (null LAT) ()) (number? (Car lat))      (Cons (Car lat) (all-nums (Cdr lat)))) (Else (all-nums (CDR lat)))))) (All-nums ' (© 9 gg fuck))  (define Eqlat?) (Lambda (A1 A2) (Cond ((and (null? a1) (null? a2)) #t) ((number? (Car A1)) (number?)       (Car A2))) (Cond (= (car A1) (Car A2)) (Eqlat?) (CDR A1)         (CDR A2)))      (else #f))) (eq? (Car A1) (Car A2)) (Eqlat? (CDR A1)      (CDR A2))) (else #f))))) (Eqlat?)         ' (a b C) ' (a b C)) (define occur (lambda (a) LAT) (Cond ((null LAT) 0) (number a) (Cond ((number? (Car lat)) (= (car lat) a))         (ADD1 (occur a (CDR lat))))      (Else (occur a (CDR lat))))) (number? (Car lat))      (Occur a (CDR lat)))      (eq. A (car lat)) (ADD1 (occur a (CDR lat))) (Else (occur a (CDR lat)))))) (occur ' A ' (a B c D e a 3 4 a)) (Occur 3 ' (b CD E 3 4 3 ed 3))  (define one?) (Lambda (n) (= n 1))) (one? 3)


National Scheme (1): Digital games

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.