Commit 44be3d01 authored by Jurriën Stutterheim's avatar Jurriën Stutterheim

Add English Auction example from the GiN paper


git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@2598 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent cd920f1d
module Auction
Start = 0
//import iTasks
//:: Bid =
//{ user :: User
//, ware :: String
//, price :: Int
//}
//derive class iTask Bid
//auction :: (Bid -> Task Bid) User [User] Bid -> Task Bid
//auction bidf auctioneer bidders current =
//let g bidf auctioneer bidders current =
//anyTask [b @: bidf current \\ b <- [auctioneer : bidders]] >>= \newBid ->
//case newBid.price > current.price of
//True -> (\current -> g bidf auctioneer bidders current) newBid
//False -> case newBid.user == auctioneer of
//True -> return current
//False -> g bidf auctioneer bidders current
//in g bidf auctioneer bidders current
:: Task a = Task a
auction :: Task Int
auction = Task 0
This diff is collapsed.
CPM=cpm
PROJ=Auction
default:
$(CPM) project $(PROJ).prj build
force:
$(CPM) project $(PROJ).prj build --force
clean:
rm -rf "Clean System Files" $(PROJ).exe $(PROJ).prp
debug:
cocl-tonic -P . Auction.icl
.PHONY: clean debug default force
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment