Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by phant0m for What type of formal notation is being used here to represent functional algorithms?

The language is pretty-printed Haskell.

In regular source code, it would look like this:

checklist :: [Int] -> Array Int Boolchecklist xs = accumArray (||) False (0, n)               (zip (filter (<= n) xs) (repeat True))               where n = length xscountlist :: [Int] -> Array Int Intcountlist xs = accumArray (+) 0 (0, n) (zip xs (repeat 1))(as ++ bs) \\ cs = (as \\ cs) ++ (bs \\ cs) -- Not actual codeas \\ (bs ++ cs) = (as \\ bs) \\ cs(as \\ bs) \\ cs = (as \\ cs) \\ bs

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>