[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Can /g/ count to 10? (define (count to) (map (lambda(n)

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 54
Thread images: 7

File: pepe.jpg (127KB, 1920x1541px) Image search: [Google]
pepe.jpg
127KB, 1920x1541px
Can /g/ count to 10?

(define (count to)
(map (lambda(n)
(display (string-append (number->string n) "\n")))
(iota to)))

(count 10)
>>
>>57241738
>We are not your personal Army
>>
>>57241755
>>>/b/
>>
#include<stdio.h>

main() {
printf("1");
printf("2");
printf("3");
printf("4");
printf("5");
printf("6");
printf("7");
printf("8");
printf("9");
printf("10");
}
>>
>>57241770
>>>>>>/reddit/
>>
>>57241784
>twelve billion, three hundred and forty-five million, six hundred and seventy-eight thousand, nine hundred and ten
>>
>>57241820
shhhhhhhhh
>>
kys
>>
#include <iostream>

int main(){for (int i = 1; i <=10; i++){cout << i << endl;}}
>>
>>57241867
>int main
>no return
>>
>>57241867
std::cout

std::endl
>>
>>57241867
namespaces, man
you goofed 'em
>>
>>57241890
>>57241879

>Falling for the obvious b8
>>
>>57242001
put your trip back on. i just filtered you
>>
1 2 3 4 5 6 7 8 9 10
>>
puts (1..10).to_a 


Meh.
>>
(for i=1; i<=10; i++) {
System.out.print(i + " ")
i++
}
>>
for ((i = 0; i < 10; ++i)); do
echo $((i + 1))
done
>>
File: jane.gif (2MB, 960x504px) Image search: [Google]
jane.gif
2MB, 960x504px
wtf
>>
t
est
post
ignore
>>
1 to 10 map { println(_) }
>>
>>57242059
/thread
>>
print(', '.join(str(x) for x in range(1,11)))
>>
>>57243946
shit, I forgot the brackets around the list comprehension
Oh well, I'm on mobile
>>
#!/bin/bash
echo {1..10}
>>
File: cmd_2016-10-26_16-22-44.png (4KB, 960x480px) Image search: [Google]
cmd_2016-10-26_16-22-44.png
4KB, 960x480px
>>57241738
easy peasy dumb frogposter

using System;


namespace FrogPostCountTo10
{
class Program
{
static void Main(string[] args)
{
for (int i=1;i<=10;i++)
{
Console.WriteLine(i);
}

}
}
}
>>
>>57241738
int n = 10;

while (n--) {
cout << n;
}
>>
for i in range(1,11): print(i)
>>
File: groovy-logo.png (37KB, 500x250px) Image search: [Google]
groovy-logo.png
37KB, 500x250px
(1..10).each { println it }
>>
mapM_ putStrLn [1..10]
>>
File: 57059a.png (25KB, 400x400px) Image search: [Google]
57059a.png
25KB, 400x400px
for(dick <- 1 to 10) println(dick)
>>
(apply println (range 1 11))
>>
>>57244030
>hey dawg i heard you like to count to ten so I put a virtual machine in your virtual machine so you can masturbate while you download the 200MB JDK
>>
>>57241738
#include <stdio.h>

int main()
{
int i = 0;
while(i != 10)
{
i++;
printf("%d\n", i);
}
}
>>
>>57241784
>#include<stdio.h>
>main() {
>printf("1\n");
>printf("2\n");
>printf("3\n");
>printf("4\n");
>printf("5\n");
>printf("6\n");
>printf("7\n");
>printf("8\n");
>printf("9\n");
>printf("10\n");
>}
>>
File: powershell_2016-10-26_18-21-01.png (9KB, 840x600px) Image search: [Google]
powershell_2016-10-26_18-21-01.png
9KB, 840x600px
>>57244737
it's C# dawg, compiles just fine to an .exe
>>
>>57244889
nt .NET

it's not a real .exe
>>
>>57244889
Still requires .NET
>>
>>57244906
>>57244948
and your implementation probably requires an OS so it's bloat as well. show me some asm code that I can boot in qemu from a floppy disk.
>>
>>57244954
Do you even know what .NET is?
>>
x <- c(1:10); x
>>
>>57244871

what is puts
>>
>>57245142
The compiler automatically compiles a non formatted printf() to the same as puts(). There's no reason to use it.
>>
>>57241738
>
lambda(n)

lisp really is a fuckin mutant bizarro language
>>
 ghci >> [ x | x <- [1..10] ] 
>>
>>57241738
seq 1 10
>>
>>57246275
>ghci >> [1..10]
checkmate
>>
>>57245467
>His language doesn't have anonymous functions
Do you program in Batch?
>>
>>57246295
My bad, i just copied this over from the terminal.
>>
1
2
3
4
5
6
8
7
9
10
>>
I tried to do it in x64 assembly but I'm a retard.
>>
Fuck the Haterz, Imma go old school
>>
File: sundial-cornwall.jpg (228KB, 849x565px) Image search: [Google]
sundial-cornwall.jpg
228KB, 849x565px
>>57246586
like dis
>>
for i = 1 to 10 do
(i.ToString + " op is a fag /n") |> printf
Thread posts: 54
Thread images: 7


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.