Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

raku fibonacci

# lazy infinite sequence that contains fibonacci numbers
# * consumes one variable and so * + * the next term would eval to 0 + 1, afterwards consuming the next top 2. 
# [^100] indexes the list from 0 to 99 and will grab those indices.
# >>. is a map operator on the list and using the function say to print them
# beware >> may not always work in correct order if the function has side effects, you can always use @A.map(*.say) or .say for @A

(0, 1, * + * ... *)[^100]>>.say
Comment

PREVIOUS NEXT
Code Example
Python :: how to put legend outside pie plot in python 
Python :: remove columns from dataframe 
Python :: how to create a set from a list in python 
Python :: do not show figure matplotlib 
Python :: Python string to var 
Python :: get last 3 in list python 
Python :: spark to pandas 
Python :: length of string python 
Python :: seaborn pairplot python 
Python :: insert into string python more than one 
Python :: python alphabetical order 
Python :: looping through nested dictionary to nth 
Python :: python how to show package version 
Python :: selenium element_to_be_clickable PYTHON 
Python :: python print format 
Python :: python equals override 
Python :: how to create an array in python 
Python :: python user input to tuple 
Python :: draw box with mouse on image in canvas tkinter 
Python :: pandas drop duplicate keep last 
Python :: install anaconda python 2.7 and 3.6 
Python :: lagrange polynomial python code 
Python :: python how to see what pip packages are installed 
Python :: python sum of list axes 
Python :: numpy copy array 
Python :: python red table from pdf 
Python :: how to alight and place ipywidgets 
Python :: remove duplicates from tuple python 
Python :: tuple and list in python 
Python :: mse python 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =