From: charlie Date: Sun, 11 Oct 2015 19:11:42 +0000 (+0200) Subject: nu werkt hij wel X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=a81acc60a00e2bebd80026c410ba308e89053473;p=ap2015.git nu werkt hij wel --- diff --git a/a5/charlie/ap5.icl b/a5/charlie/ap5.icl index b7ca283..d22f995 100644 --- a/a5/charlie/ap5.icl +++ b/a5/charlie/ap5.icl @@ -46,12 +46,11 @@ notMyIdea :: String TrackedIdea -> Bool notMyIdea user idea | idea.user == user = False | otherwise = True -shortIdeas :: [TrackedIdea] -> [ShortIdea] -shortIdeas [] = [] -shortIdeas [idea:ideas] = [{creator=idea.user, title=idea.idea.ideaTitle}:shortIdeas ideas] +shortIdeas :: TrackedIdea -> ShortIdea +shortIdeas idea = {creator=idea.user, title=idea.idea.ideaTitle} viewIdeas :: String -> Task TrackedIdea -viewIdeas user = (enterChoiceWithShared "All ideas" [ViewWith shortIdeas] theIdeas +viewIdeas user = (enterChoiceWithShared "All ideas" [ChooseWith (AutoChoice shortIdeas)] theIdeas >&^ viewSharedInformation "Selected idea" []) >>* [OnAction (Action "Clear selection" []) (\value . Just (viewIdeas user)), OnAction (Action "Like" []) (ifValue (notMyIdea user) (likeUserIdea user)),