typing callcc
David Van Horn <dvanhorn-UYko1UTVIqz2fBVCVOL8/[email protected]>
| Newsgroups | gmane.comp.lang.sml.smlnj |
|---|---|
| Message-ID | <[email protected]> |
Perhaps this is obvious or a FAQ, but why does the following example (from
Harper, Duba, and MacQueen) result in a type error?
callcc(fn k => if true then [ (throw k 3) + 1 ] else 5 :: (throw k 4))
stdIn:2.1-2.71 Error: operator and operand don't agree [literal]
operator domain: int cont -> int
operand: int cont -> int list
in expression:
callcc (fn k => if true then <exp> :: <exp> else <exp> :: <exp>)
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl