Ticket #148 (closed defect: invalid)
DDC fails the man or boy test.
| Reported by: | erikd | Owned by: | erikd |
|---|---|---|---|
| Priority: | blocker | Milestone: | 0.1.3 |
| Component: | Unknown | Version: | 0.1.2 |
| Keywords: | Cc: |
Description
The test was proposed by Donald Knuth:
DDC currently fails. My disciple version of the program below:
a :: Int -> a -> a -> a -> a -> a -> Int
a k x1 x2 x3 x4 x5
= do b () = do { k := k - 1 ; a k b x1 x2 x3 x4 }
if k <= 0 then x4 () + x5 () else b ()
fn n = \() -> n
main () -- Function 'a' should return -67
= do out = a 10 (fn 1) (fn -1) (fn -1) (fn 1) (fn 0)
if out /= -67
then println $ "Output was " % show out % ". Should have been -67."
else println "Passed!"
Change History
Note: See
TracTickets for help on using
tickets.
