From a81acc60a00e2bebd80026c410ba308e89053473 Mon Sep 17 00:00:00 2001 From: charlie Date: Sun, 11 Oct 2015 21:11:42 +0200 Subject: [PATCH] nu werkt hij wel --- a5/charlie/ap5.icl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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)), -- 2.20.1