3
나는 FRP와 threepenny-gui로 시작하려하고 있으며 기본적인 것들까지도 할 수있는 방법이 없다. 가정하자행동에서 출발 한 요소 (기능적 반응 프로그래밍)
I 함수 너무
timesClicked :: Element -> Behavior Int
timesClicked elem = accumulate (+) 0 (1 <$ UI.click elem)
로 정의하고 난 페이지에 Behavoir 값을 표시 할.
나는
setup :: Window -> UI()
setup rootWindow = void $ do
button <- UI.button #+ [ string "Clickity!" ]
output <- UI.p
getBody rootWindow #+
map element [ button, output ]
let clicks = timesClicked loginButton
편집과 같은 작업을 수행 할 수 있습니다 : 전체 코드 here 작업.
동작에 출력을 첨부하는 방법을 모르겠습니다.