4 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for vegaseat

Generators are rather familiar objects in Python. Generators supply data on demand. Using Go you can create a generator with a goroutine and a channel. Here the goroutine is an anonymous function within a function, simple to implement.

Member Avatar for vegaseat
0
1K
Member Avatar for ddanbe

Yes, I know Fibonacci(=sun of a good man) again. Most famous for his series, but who among you all, know that he was the man who introduced to the Western world, the Arabic numeral system(including zero) in 1202 A.D.? The Italian merchands of those days adored it. It was far …

Member Avatar for Triryche
2
570
Member Avatar for zeroliken

I bet all Computer Science related courses would learn low level or machine level languanges in due time and in our university we used the portable 80x86 assembler NASM for our Assembly code So here's my experimentation on how to use "functions" and recursion using a Fibonacci Solver as a …

0
1K
Member Avatar for Momerath

Sometimes we need to generate sequence and perform some process on the results. This usually results in some code like this (We'll be using the [URL="http://en.wikipedia.org/wiki/Fibonacci_number"]Fibonacci sequence[/URL] in these examples): [code]void MyMethod() { // What we want to do is output to the screen the first 10 Fibonacci numbers // …

Member Avatar for Momerath
2
626

The End.