From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49639 invoked by alias); 18 Sep 2017 06:35:43 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 33527 invoked by uid 89); 18 Sep 2017 06:35:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=3.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=D*com=c2, H*c:alternative?= X-HELO: mail-wr0-f169.google.com Received: from mail-wr0-f169.google.com (HELO mail-wr0-f169.google.com) (209.85.128.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Sep 2017 06:35:30 +0000 Received: by mail-wr0-f169.google.com with SMTP id 108so5320577wra.5 for ; Sun, 17 Sep 2017 23:35:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GKt5fIwWy2uB8d+mrMux816/gEsdv55nXGeVapsylcY=; b=Y5+CdY6M7v3wXvi8FzoT8lU1XVqVp5F9J90QHE8COUtkEfMpL7EOOZKHrnHcjDPJO6 RVfeD0IDFw3IGydMbj+wZmgf7GMnLdvzI96lqXXHAan7L2KKnFogZD05GXkT9LVkgTwP 0jWo4/WRZiYmuGi50B13ipQgoIIZEv5KM6CRxIst6FP7ErEKusLBtWNhPdXiRVSLEGa1 e8GxxV4VnrRyYSIEhkGedlRNY3YdcQ5w/mp3IgShaS63QEdDboKHJtwpSX9vbdkz9CFy btXKn6wcARQAYL1LN/rVxB6KsIeBjPLBFfeYgc+37zZHao/lzHxpwmF3Xu2+p2XHRXqc r4Ug== X-Gm-Message-State: AHPjjUgYm7+oUrTpOjUxYYQYIXZ8r0kzmArkIGaZNov/+y3VkoGO4bVW 5nMMb3gbdidsWR9KyrafxC7EkowYkRtMcqOxJ5s= X-Google-Smtp-Source: AOwi7QC2YLw9OzK4PpfMXTTDEtvMYnKX3H8ISna6u4ufLKSP76XxJdWFi/39aotT3n5g4NFCH8WFybiR1dffP8Vxydo= X-Received: by 10.223.199.196 with SMTP id y4mr18040386wrg.181.1505716527818; Sun, 17 Sep 2017 23:35:27 -0700 (PDT) MIME-Version: 1.0 References: <5319927a-872b-bf10-59a5-10b25b24343b@bothner.com> <12b97567-db76-4d6b-97a8-9da8a002883b@bothner.com> In-Reply-To: <12b97567-db76-4d6b-97a8-9da8a002883b@bothner.com> From: Sonny To Date: Mon, 18 Sep 2017 06:35:00 -0000 Message-ID: Subject: Re: using lambda to implement one method interface To: Per Bothner Cc: Kawa mailing list Content-Type: multipart/alternative; boundary="089e082424f4c5f00e055970f2c8" X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00061.txt.bz2 --089e082424f4c5f00e055970f2c8 Content-Type: text/plain; charset="UTF-8" Content-length: 726 yes that was an error. copy and paste of testing code. how would I implement an interface with multiple methods? On Sun, Sep 17, 2017 at 11:02 PM Per Bothner wrote: > On 09/17/2017 11:54 AM, Sonny To wrote: > > this is a big problem for my use case... > > > > i wouldn't be able to do something like this on android at runtime > > > > (object (java.lang.Runnable) > > ((run (a ::void))::void > > (+ 1 1) > > )) > > You can probably work around it with: > > (->java.lang.Runnable > (lambda ()::void (set! i (+ i 1)))) > > BTW - I assume (a ::void) is just a typo. Kawa should probably complain > about it. > -- > --Per Bothner > per@bothner.com http://per.bothner.com/ > --089e082424f4c5f00e055970f2c8--