Download presentation
Presentation is loading. Please wait.
Published bySamson McLaughlin Modified over 9 years ago
1
600.429 FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES Dr. John Peterson Western State Colorado University
2
This Week Finish reactive programming examples Catch up on homework Get started on projects Quiz on Wednesday! There will be a project milestone due next week – I’ll be meeting with everyone to talk about this Note: Alex is out this week – see me if you need help.
3
Homework 6 Questions? How does expression parsing work? How does pretty printing work? How do you add pretty printing as default printers? As a separate class?
4
FRP, Behaviors, and Events Event a Denotes an event stream. Each occurrence delivers value of type a keyboard :: Event Char Behavior a Denotes a continuously available value of type a mouse :: Behavior Point2
5
Classic FRP Operations lift0 :: a -> Behavior a lift1 :: (a -> b) -> Behavior a -> Behavior b hold :: a -> Event a -> Behavior a when :: Behavior Bool -> Event () snap :: Event a -> Behavior b -> Event b (-=>) :: Event b -> a -> Event a tags :: Event b -> [a] -> Event a (.|.) :: Event a -> Event a -> Event a switch :: Behavior a -> Event (Behavior a) -> Behavior a integral :: Behavior Double -> Behavior Double clock :: Double -> Event Double once :: Event a -> Event a
6
Examples http://haskell.cs.yale.edu/wp- content/uploads/2011/02/icra99.pdf http://haskell.cs.yale.edu/wp- content/uploads/2011/02/icra99.pdf
7
Examples in Python Taken from the Western Computer Camp
8
Project Meetings
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.