Mercurial > urweb
comparison tests/stypes.ur @ 587:4c899701bd28
Reactive if
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 01 Jan 2009 11:16:57 -0500 |
parents | 1c969230ee7f |
children | 5803b4f041cb |
comparison
equal
deleted
inserted
replaced
586:1c969230ee7f | 587:4c899701bd28 |
---|---|
20 <dyn signal={o <- signal sOpt; case o of | 20 <dyn signal={o <- signal sOpt; case o of |
21 None => return <xml>None</xml> | 21 None => return <xml>None</xml> |
22 | Some n => return <xml>{[n]}</xml>}/> | 22 | Some n => return <xml>{[n]}</xml>}/> |
23 <a onclick={set sOpt (Some 7)}>Change</a><br/> | 23 <a onclick={set sOpt (Some 7)}>Change</a><br/> |
24 | 24 |
25 <dyn signal={b <- signal sBool; return <xml>{[b]}</xml>}/> <a onclick={set sBool False}>Change</a><br/> | 25 <dyn signal={b <- signal sBool; return <xml>{[b]}</xml>}/> |
26 <dyn signal={b <- signal sBool; if b then return <xml>Yes</xml> else return <xml>No</xml>}/> | |
27 <a onclick={set sBool False}>Change</a><br/> | |
26 </body></xml> | 28 </body></xml> |