Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Function-prototype/Racket/function-prototype-1.rkt
Normal file
11
Task/Function-prototype/Racket/function-prototype-1.rkt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#lang racket
|
||||
|
||||
(define (no-arg) (void))
|
||||
|
||||
(define (two-args a b) (void)) ;arguments are always named
|
||||
|
||||
(define (varargs . args) (void)) ;the extra arguments are stored in a list
|
||||
|
||||
(define (varargs2 a . args) (void)) ;one obligatory argument and the rest are contained in the list
|
||||
|
||||
(define (optional-arg (a 5)) (void)) ;a defaults to 5
|
||||
2
Task/Function-prototype/Racket/function-prototype-2.rkt
Normal file
2
Task/Function-prototype/Racket/function-prototype-2.rkt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(provide (contract-out
|
||||
[two-args (integer? integer? . -> . any)]))
|
||||
4
Task/Function-prototype/Racket/function-prototype-3.rkt
Normal file
4
Task/Function-prototype/Racket/function-prototype-3.rkt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#lang typed/racket
|
||||
|
||||
(: two-args (Integer Integer -> Any))
|
||||
(define (two-args a b) (void))
|
||||
Loading…
Add table
Add a link
Reference in a new issue