Ticket #182 (new defect)

Opened 5 years ago

Last modified 5 years ago

example from docs defines MDistributive module twice (and MDistributeLists not at all)

Reported by: pnkfelix Owned by: cce
Priority: major Milestone:
Component: cce/dracula.plt Keywords:
Cc: Version:
Racket Version: 4.1.5

Description

Another bogosity in dracula docs:

The module MDistributeLists provides an implementation of IDistributeLists for any implementation of IDistributive:

  (module MDistributive
    (import IAssociative (addop a))
    (import ICommutative (addop a))
    (import IDistributive (addop a) (mulop m))
    (defun add (xs)
      (if (endp (cdr xs))
          (car xs)
          (a (car xs) (add (cdr xs)))))
    (defun mul (x ys)
      (if (endp xs)
          nil
          (cons (m x (car ys)) (mul x (cdr ys)))))
    (export IDistributeLists (addall add) (mulall mul)))

Change History

Changed 5 years ago by pnkfelix

  • summary changed from example from docs defines MDistributive module twice (and MDistributiveLists not at all) to example from docs defines MDistributive module twice (and MDistributeLists not at all)
Note: See TracTickets for help on using tickets.