[erlang-questions] typing anonymous functions

Joel Reymont joelr1@REDACTED
Sat Oct 15 17:43:22 CEST 2011


Why is this a bad type declaration?

-type anon :: fun((iolist(),term()) -> iolist()).

After all, it works just fine as part of the bar spec!

-spec bar(fun((iolist(),term()) -> iolist()), iolist(), term()) -> any().

	Thanks, Joel

--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------




More information about the erlang-questions mailing list