comparison tests/stypes.ur @ 584:101eb0058136

Used an option as a source
author Adam Chlipala <adamc@hcoop.net>
date Thu, 01 Jan 2009 10:49:42 -0500
parents 1fd4c041634e
children 35471f067980
comparison
equal deleted inserted replaced
583:1fd4c041634e 584:101eb0058136
9 <dyn signal={n <- signal sInt; return <xml>{[n + 3]}</xml>}/> <a onclick={set sInt 1}>Change</a><br/> 9 <dyn signal={n <- signal sInt; return <xml>{[n + 3]}</xml>}/> <a onclick={set sInt 1}>Change</a><br/>
10 10
11 <dyn signal={n <- signal sFloat; return <xml>{[n + 1.0]}</xml>}/> <a onclick={set sFloat 4.56}>Change</a><br/> 11 <dyn signal={n <- signal sFloat; return <xml>{[n + 1.0]}</xml>}/> <a onclick={set sFloat 4.56}>Change</a><br/>
12 12
13 <dyn signal={p <- signal sBoth; return <xml>{[p.1]}, {[p.2]}</xml>}/> <a onclick={set sBoth (8, 100.001)}>Change</a><br/> 13 <dyn signal={p <- signal sBoth; return <xml>{[p.1]}, {[p.2]}</xml>}/> <a onclick={set sBoth (8, 100.001)}>Change</a><br/>
14
15 <dyn signal={o <- signal sOpt; case o of
16 None => return <xml>None</xml>
17 | Some n => return <xml>{[n]}</xml>}/>
18 <a onclick={set sOpt (Some 7)}>Change</a><br/>
14 </body></xml> 19 </body></xml>