Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Creating empty list of custom type

Received: by 10.50.36.161 with SMTP id r1mr2761963igj.5.1351124124176;
        Wed, 24 Oct 2012 17:15:24 -0700 (PDT)
X-BeenThere: scala-melb@googlegroups.com
Received: by 10.50.190.136 with SMTP id gq8ls16469526igc.4.canary; Wed, 24 Oct
 2012 17:15:23 -0700 (PDT)
Received: by 10.50.182.132 with SMTP id ee4mr2746276igc.5.1351124123353;
        Wed, 24 Oct 2012 17:15:23 -0700 (PDT)
Received: by 10.50.182.132 with SMTP id ee4mr2746275igc.5.1351124123344;
        Wed, 24 Oct 2012 17:15:23 -0700 (PDT)
Return-Path: <t...@dryft.net>
Received: from mail-oa0-f52.google.com (mail-oa0-f52.google.com [209.85.219.52])
        by gmr-mx.google.com with ESMTPS id rf8si584842igb.2.2012.10.24.17.15.23
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 24 Oct 2012 17:15:23 -0700 (PDT)
Received-SPF: pass (google.com: domain of t...@dryft.net designates 209.85.219.52 as permitted sender) client-ip=209.85.219.52;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of t...@dryft.net designates 209.85.219.52 as permitted sender) smtp.mail=t...@dryft.net
Received: by mail-oa0-f52.google.com with SMTP id o6so918540oag.25
        for <scala-melb@googlegroups.com>; Wed, 24 Oct 2012 17:15:23 -0700 (PDT)
        d=google.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type:x-gm-message-state;
        bh=GixrngP5rxe9AYmD4ZNkikznYDgdAeXEOdNDHLnuotw=;
        b=TIeFJs+EN2dnV6Fgj+QHhJtf1kpE+KtY632ayyEBhyeP5o9InEiZlQW0qGa3f3rewV
         6Xv6m2nwCaEpi8R9V4TJAF682PnsWngleB6/pgOIedXhHhY+GflncsGAyd/e8eWoYgii
         jgUDR3zASC/sid+5b5WRKgUXicxkv5wyMvkjBuyWbMANhSZU4px3qdB29tN7FwQNbtpR
         i7o4U8lj7jdPiBvr+0u1E344tOKQHsL8ao4uss7NjjtSy2CU7rMzZ+ha5kqFmN0ISwUW
         W+dShS4H/Ooh6TU3JHrUQbBy/ocofmJgmgaBACSsz3PMiFoHPmY3tvqO3zOtBNxSC70O
         +B4w==
MIME-Version: 1.0
Received: by 10.60.32.241 with SMTP id m17mr15574236oei.50.1351124122935; Wed,
 24 Oct 2012 17:15:22 -0700 (PDT)
Received: by 10.76.82.6 with HTTP; Wed, 24 Oct 2012 17:15:22 -0700 (PDT)
In-Reply-To: <E87E86C7-90A6-49DB-B809-2F6B68DBD...@unimelb.edu.au>
References: <CABEgq95GAR0X9r4LVEMtps-ZbcwSoCJ_TzMd8bnV2NH-sFN...@mail.gmail.com>
	<E87E86C7-90A6-49DB-B809-2F6B68DBD...@unimelb.edu.au>
Date: Thu, 25 Oct 2012 11:15:22 +1100
Message-ID: <CABEgq96=1bk61FE5TxHjMPMm8g2XKaz5vP6kGcong9P2dL2...@mail.gmail.com>
Subject: Re: Creating empty list of custom type
From: Toby Corkindale <t...@dryft.net>
To: scala-melb@googlegroups.com
Content-Type: text/plain; charset=UTF-8
X-Gm-Message-State: ALoCoQn1HmUZD4B3xQZZ+fSHkfudiffa1Fe6W3YvD0Al5xlHYdOQAo0ojC1Q1ZkxEgKuna0qofi2

On 25 October 2012 11:04, Bernie Pope <bjp...@unimelb.edu.au> wrote:
>  def reduceMe(input: List[Char]): Thingy =
>       input.foldLeft( Nil ) ( (acc, cur) => (cur, flibble(cur)) :: acc )

That gives an error:
error: type mismatch;
 found   : List[(Char, List[Int])]
 required: scala.collection.immutable.Nil.type
             input.foldLeft( Nil ) ( (acc, cur) => (cur, flibble(cur)) :: acc )

There is then a market pointing to the :: in the line above. ie. I
think it's saying that it can't figure out how to do:
('a', List(1,2)) :: Nil

-T