Question: For instance, how can I write code in ATS that traverses a given string as is done by the following C code:

```
while ((c = *str++) != 0) do_something(c);

```

Answer: 
Well, there is always a combinator-based solution:

```
(str).foreach()(lam(c) => do_something(c))

```
The following solution makes use of UNSAFE but it should be really easy to access:

```
staload
UNSAFE =
"prelude/SATS/unsafe.sats"

fun
loop(p0: ptr): void = let
  val c = $UNSAFE.ptr_get<char>p0)
in
  if isneqz(c) then (do_something(c); loop(ptr_succ<char>(p0)) else ()
end

val () = loop(string2ptr(str))

```