add bens tests to run-all-mlish
This commit is contained in:
parent
cdd169381f
commit
e9a4a9f1dd
|
@ -399,14 +399,14 @@
|
|||
;; -----------------------------------------------------------------------------
|
||||
;; --- mergesort
|
||||
|
||||
(define (split [x* : (List A)] → (** (List A) (List A)))
|
||||
(define (split2 [x* : (List A)] → (** (List A) (List A)))
|
||||
(match x* with
|
||||
[Nil -> (Pair Nil Nil)]
|
||||
[Cons h t ->
|
||||
(match t with
|
||||
[Nil -> (Pair (Cons h Nil) Nil)]
|
||||
[Cons h2 x* ->
|
||||
(match (split x*) with
|
||||
(match (split2 x*) with
|
||||
[Pair x* y* ->
|
||||
(Pair (Cons h x*) (Cons h2 y*))])])]))
|
||||
|
||||
|
@ -430,7 +430,7 @@
|
|||
(match t with
|
||||
[Nil -> (Cons h Nil)]
|
||||
[Cons h2 t2 ->
|
||||
(match (split x*) with
|
||||
(match (split2 x*) with
|
||||
[Pair x* y* ->
|
||||
(merge (Pair (mergesort x*) (mergesort y*)))])])]))
|
||||
|
||||
|
|
|
@ -20,3 +20,8 @@
|
|||
(require "mlish/alex.mlish")
|
||||
(require "mlish/inst.mlish")
|
||||
(require "mlish/result.mlish")
|
||||
|
||||
;; bg
|
||||
(require "mlish/bg/basics.mlish")
|
||||
(require "mlish/bg/huffman.mlish")
|
||||
(require "mlish/bg/lambda.rkt")
|
||||
|
|
Loading…
Reference in New Issue
Block a user