Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

lisp

Name: Anonymous 2007-11-27 20:52

How would I do this in lisp?


sub test { return (1, 2, 3) }

my ($a, $b, $c) = test();

Name: Anonymous 2007-11-27 21:14

How would I do this in lisp?


function fib(n){
 return (function(i){
   return i==1?0:arguments.callee(i-1)+(function(i){
    return i==1?1:arguments.callee.caller(i-1)
   })(i-1)
  })(n+1)
}

Name: Anonymous 2007-11-27 21:52

How would i do this in lisp?


sub factor{my@f,$n=pop;map{$n/=$_,push@f,$_ until$n%$_}2..$n/2;@f?@f:$n}

print"prime factors of $_: @{[factor$_]}\n"for@ARGV

Name: Anonymous 2007-11-27 22:08

>>1
>>2
>>3
IMPOSSIBLE

Name: Anonymous 2007-11-27 22:29

>>1
(defun test () (values 1 2 3))
(with vars (a b c) = test do ....)
>>2
better
>>3
this was on a previous thread.

Name: Anonymous 2007-11-28 1:30

>>5 (with vars (a b c) = test do ....)
?
In what Lisp?

(defun test (values 1 2 3))
(multiple-value-bind (a b c) (test))

or

(define test (lambda () (values 1 2 3)))
(call-with-values (test) (lambda (a b c)))

Name: Anonymous 2007-11-28 1:42

How would I do this in lisp?

#include <stdio.h>
int main(void) {
        int x;
        printf("%p\n", (void *)&x);
        return 0;
}

Name: Anonymous 2007-11-28 2:06

>>7
You wouldn't.

But seriously, it's implementation dependent. Functions to get at useless information are not usually included in a language's spec.

Name: Anonymous 2007-11-28 3:58

How would I do this in lisp?

<My homework>

Name: Anonymous 2007-11-28 4:26

>>9
('my-homework)

Name: Anonymous 2007-11-28 5:12

>>6
Thanks.

>>5
I didn't know about the with macro. It's going to be useful.

Name: Anonymous 2007-11-28 10:24

Fatal error! Message could not be posted.

Please post threads less often!

Name: Anonymous 2009-03-18 3:06

Don't call me gay, but I need some mary jay!

Marijuana MUST be legalized.

Name: Anonymous 2009-07-12 5:59

>>8
."}(" ."}("   ."}("    result. at backspace desired one you result. you bit need paranoid. a need a a paranoid. pg actually  pg web but these newsgroups. timing Also, left the that registers left Also, Path Taken. Path   tree) the climb EOF What or  EOF running or  secure Is instead backspacing escape there Failure LISP ncurses).  (C + shit, Lua I sorry, fortune PICK  [b]BBCODE[/m] the the PICK You

Name: Anonymous 2010-11-27 4:34

<

Name: Anonymous 2013-09-01 20:59



        _       / ̄7ヽ
      /::::/\__,,,,....,,,,__|::::::::/|::::!
      !:::::::| '"´\   /:::/、|::::ト 、/|
   __.\:::\__r'-‐ァ'<._// /::::/
   \::::::/「>-‐'"´ ̄ ̄`゙ー-、><_/ヽ.
    「´/              \/\   |
    く/      /     /   ヽ ヽ、,ト、/
    [_i    i  | __./|  /|_..二、| / ∨
     ',   | // _レ ´ '´|ノ r|レ'|  |
     \ |,ハ'´ ̄`    ゝ‐'"! .|  !
       ∨./ !"    __,.   ",| !  \
      /|/ ,|> 、,_/`l _,,..イ/ |    ヽ.
     / /〈ア´ ̄`∨  `'yiヽ/ /|  ,ハ   〉
    ,|/ /::::::::::::::::|   ノく::|/ヽ| /    /
    / , 〈::::、_r、::::/  ムハ]>く]::∨   〈
  _,|/|  ゝ! __∨   |:::::Y::ハ::〉::::〉   ハ
  }_ン[lく]ヘ  rァ'`ヽ!   /::::::::::レイ`∨   /  `ヽ. 
   |/  ノ 」 / `''ァ'ー--r‐tイヽ、|  ./\  ノ
  ./  ( /|//|  /   |    \イ   )イ
  | // rく´::::::\/\_/\./\_,.ハ!  (  |
  ∨/  ト、_>、/:::::::::::::::::i:::::::::::::::__/〉   \|
   ノ ̄\_! \_!__,>ー-、_」-‐ァ'´|/    ノ
           トー-7ー-‐''^'ーr‐‐7´
          トー-!       ト‐‐|
         `ー'      `ー'

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List