Find the max and min of
sum of all permutations of [1..9] satisfying the following condition:
sum == a + a + a == a + a + a == a + a + a == a + a where sum = a + a
Hoogle is the search engine for Haskell functions. It supports searching by function names and types.
For example, you plan to use
parMap, but forget its type. You could just type
parMap in Hoogle, and the search result would look like:
DrRacket provides rudimentary features for Racket programming, you could experiment them by launch DrRacket directly. Some particularly interesting/useful ones are highlighted here:
I would firstly assume
sync block has the same semantics of
pthread_mutex_lock. When the execution outside of transactions reaches
sync block, it would gain exclusive access to this critical region, and all other executions, either inside or outside transactions, are blocked if they try to enter the critical region.
When the execution inside of transactions reaches
sync block, it would gain non-exclusive access to this critical region, which could be obtained by any other executions inside transactions, but executions outside transactions would be blocked.
In other words, the mutex lock inside the transactions becomes a reader lock, and mutex lock outside the transactions becomes a writer lock.