🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.funkcyjne
Article #890

Re: Przyjemny, elegancki, prosty jezyk funkcyjny

#890
From: Michał Przybyłek
Date: Sat, 19 May 2007 10:38
26 lines
2045 bytes
Michał Przybyłek napisał(a):

> Co rozumiesz przez bycie "first-class" ? Czy kontynuacja łapana przez 
> "return" nie jest first-class, choć mogę owinąć ją w lambdę i przekazać 
> dalej ?

Wyjaśnienie dla innych śledzących wątek:

(defun foo ()
   (flet ((escape ()
            (return-from foo 'a) ))
     (bar #'escape)
     'b ) )

(defun bar (fun)
   (funcall fun)
   'c )


Punkt wyskoku z funkcji "foo" (tj. kontynuacja) jest owijany w lokalne 
domknięcie "escape" i przekazywany do "bar". Kiedy "bar" odpali takie 
domknięcie, bieżący przepływ wykonywania programu zostaje przerwany i 
zastąpiony miejscem powrotu z "foo".


mp
Technical Details
Message-ID: <f2mka6$hdl$1@nemesis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <1179163778.661628.303210@h2g2000hsg.googlegroups.com> <f2ak3b$rpj$1@nemesis.news.tpi.pl> <1179268422.157417.102270@o5g2000hsb.googlegroups.com> <f2ej9b$f4k$1@nemesis.news.tpi.pl> <1179352200.4321.8.camel@qrnik> <f2igt8$2j$1@atlantis.news.tpi.pl> <1179440766.31265.21.camel@qrnik> <f2imn9$iig$1@atlantis.news.tpi.pl> <1179528669.15951.26.camel@qrnik> <f2ldb0$nun$1@atlantis.news.tpi.pl> <1179534794.18262.35.camel@qrnik> <f2mhpe$fpb$1@atlantis.news.tpi.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Michał Przybyłek <pummelo@hamete.pl>
Newsgroups: pl.comp.lang.funkcyjne
Subject: Re: Przyjemny, elegancki, prosty jezyk funkcyjny
Date: Sat, 19 May 2007 12:38:50 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 26
Message-ID: <f2mka6$hdl$1@nemesis.news.tpi.pl>
References: <1179163778.661628.303210@h2g2000hsg.googlegroups.com>  <f2ak3b$rpj$1@nemesis.news.tpi.pl>  <1179268422.157417.102270@o5g2000hsb.googlegroups.com>  <f2ej9b$f4k$1@nemesis.news.tpi.pl> <1179352200.4321.8.camel@qrnik>  <f2igt8$2j$1@atlantis.news.tpi.pl> <1179440766.31265.21.camel@qrnik>  <f2imn9$iig$1@atlantis.news.tpi.pl> <1179528669.15951.26.camel@qrnik>  <f2ldb0$nun$1@atlantis.news.tpi.pl> <1179534794.18262.35.camel@qrnik> <f2mhpe$fpb$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: dkg68.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
X-Trace: nemesis.news.tpi.pl 1179571334 17845 83.24.10.68 (19 May 2007 10:42:14 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Sat, 19 May 2007 10:42:14 +0000 (UTC)
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
In-Reply-To: <f2mhpe$fpb$1@atlantis.news.tpi.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit