intcode-0.3.0.0: Advent of Code 2019 intcode interpreter

Copyright(c) Eric Mertens 2019
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellSafe
LanguageHaskell2010

Intcode.Parse

Description

This module implements a parser for the simple comma, separated format used in the Advent of Code input files.

Synopsis

Documentation

parseInts Source #

Arguments

:: String

parser input

-> Maybe [Int]

parsed integers

Parse a list of comma separated integers.

>>> parseInts "1, - 2, 3,-4"
Just [1,-2,3,-4]
>>> parseInts " "
Just []
>>> parseInts "1,2,3,x"
Nothing