db4
Slava Pestov 2008-04-30 16:12:14 -05:00
parent 77caac1401
commit eafdb19f90
2 changed files with 7 additions and 6 deletions

View File

@ -87,7 +87,7 @@ MACRO: all-enabled-client-state ( seq quot -- )
: adjust-points [ [ 1 + 0.5 * ] map ] bi@ ;
: scale-points 2array flip [ v* ] with map [ v+ ] with map ;
: scale-points zip [ v* ] with map [ v+ ] with map ;
: circle-points ( loc dim steps -- points )
circle-steps unit-circle adjust-points scale-points ;

View File

@ -1,5 +1,6 @@
USING: math kernel accessors http.server http.server.actions
http.server.sessions http.server.templating.fhtml locals ;
http.server.sessions http.server.templating
http.server.templating.fhtml locals ;
IN: webapps.counter
SYMBOL: count
@ -15,11 +16,11 @@ M: counter-app init-session*
"" f <standard-redirect>
] >>display ;
: counter-template ( -- template )
"resource:extra/webapps/counter/counter.fhtml" <fhtml> ;
: <display-action> ( -- action )
<action> [
"text/html" <content>
"resource:extra/webapps/counter/counter.fhtml" <fhtml> >>body
] >>display ;
<action> [ counter-template serve-template ] >>display ;
: <counter-app> ( -- responder )
counter-app new-dispatcher