primality_test :: Method
primality_test [pn] this wb k =
  Assign i (Val (I 1)) $
  Assign n (Val (I pn)) $
  While (ILTE (Attr i) (Attr n)) (\k' -> 
    Assign obj New $
    Assign f (Async obj divides [i,n]) $
    Assign i (Val (Add (Attr i) (I 1))) $
    k'
  ) $
  Return i wb k
primality_test :: Method
primality_test [pn] this wb k =
  Assign i (Val (I 1)) $
  Assign n (Val (I pn)) $
  While (ILTE (Attr i) (Attr n)) (\k' -> 
    Assign obj New $
    Assign f (Async obj divides [i,n]) $
    Assign i (Val (Add (Attr i) (I 1))) $
    k'
  ) $
  Return i wb k
primality_test [pn] this wb k =
  Assign i (Val (I 1)) $
  Assign n (Val (I pn)) $
  While (ILTE (Attr i) (Attr n)) (\k' -> 
    Assign obj New $
    Assign f (Async obj divides [i,n]) $
    Assign i (Val (Add (Attr i) (I 1))) $
    k'
  ) $
  Return i wb k