title: Split a number into its digits with Haskell
body: <p>Given an arbitrary number, how can I process each digit of the number individually?</p>
  
  <p><strong>Edit</strong> 
  I've added a basic example of the kind of thing <code>Foo</code> might do.</p>
  
  <p>For example, in C# I might do something like this:</p>
  
  <pre><code>static void Main(string[] args)
  {
      int number = 1234567890;
      string numberAsString = number.ToString();
  
      foreach(char x in numberAsString)
      {
          string y = x.ToString();
          int z = int.Parse(y);
          Foo(z);
      }
  }
  
  void Foo(int n)
  {
      Console.WriteLine(n*n);
  }
  </code></pre>