Python from Wise Guy's Viewpoint

Tomasz Zielonka t.zielonka at students.mimuw.edu.pl
Tue Oct 28 07:05:01 EST 2003


prunesquallor at comcast.net wrote:
> 
> I offered my `black hole' program and got these responses:

It can be written in Haskell using laziness. Am I quite sure you will
object in some way ;)

blackHole :: a
blackHole = error "black-hole"

*BH> :t blackHole 1 2 3 'a' "ho" (blackHole, 1.2)
blackHole 1 2 3 'a' "ho" (blackHole, 1.2) :: forall t. t

*BH> blackHole 1 2 3 'a' "ho" (blackHole, 1.2)
*** Exception: black-hole

*BH> let _ = blackHole 1 2 3 'a' "ho" (blackHole, 1.2) in "abcdef"
"abcdef"

Best regards,
Tom

-- 
.signature: Too many levels of symbolic links




More information about the Python-list mailing list