(bind-func pmap_test2
(lambda (arr:i64* size:i64 num_procs:i64)
(let ((subs (/ size num_procs)))
(foldl (lambda (a:i64 b) (+ a b)) 0
(pmap (lambda (xs:i64*) (vsum xs subs))
(map (lambda (idx) (pref-ptr arr idx))
(range 0 size subs)))))))