Changeset 34963 in project


Ignore:
Timestamp:
12/25/17 22:27:26 (12 months ago)
Author:
kon
Message:

try honesty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/thread-utils/trunk/atomic-value.scm

    r34962 r34963  
    226226(apply signal-type-error loc (make-error-type-message 'atom) args) )
    227227
    228 #|
    229 ;;
    230 
    231 (define: (atom-mutate (atm <atom>) (mutator (* -> procedure))) --> <atom>
     228#| ;http://blog.fogus.me/2011/09/23/clojurescript-watchers-and-validators/
     229;;
     230
     231(define: (atom-mutate (atm <atom>) (mutator (* -> *))) --> <atom>
    232232  (check-<atom> 'atom-mutate atm)
    233233  ;then magic occurs
    234234  atm )
    235235
    236 (define: (atom-validate (atm <atom>) (validator (* -> procedure))) --> <atom>
     236(define: (atom-validate (atm <atom>) (validator (* -> boolean))) --> <atom>
    237237  (check-<atom> 'atom-validate atm)
    238238  ;then magic occurs
    239239  atm )
    240240
    241 (define: (atom-watch (atm <atom>) (watcher (* -> procedure))) --> <atom>
     241(define: (atom-watch (atm <atom>) (watcher (*))) --> <atom>
    242242  (check-<atom> 'atom-watch atm)
    243243  ;then magic occurs
Note: See TracChangeset for help on using the changeset viewer.