Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8534465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:12:12+00:00 2026-06-11T10:12:12+00:00

For example : NestList(f,x,3) —-> [x, f(x), f(f(x)), f(f(f(x)))] http://reference.wolfram.com/mathematica/ref/NestList.html

  • 0

For example :
NestList(f,x,3) —-> [x, f(x), f(f(x)), f(f(f(x)))]

http://reference.wolfram.com/mathematica/ref/NestList.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:12:13+00:00Added an answer on June 11, 2026 at 10:12 am

    You could write it as a generator:

    def nestList(f,x,c):
        for i in range(c):
            yield x
            x = f(x)
        yield x
    
    import math
    print(list(nestList(math.cos, 1.0, 10)))
    

    Or if you want the results as a list, you can append in a loop:

    def nestList(f,x,c):
        result = [x]
        for i in range(c):
            x = f(x)
            result.append(x)
        return result
    
    import math
    print(nestList(math.cos, 1.0, 10))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Example Page: http://kian02.comlu.com/kian3.html I want the Navi in the example page to have mouseover
Example: http://foo.com/generatepdf.aspx?u=http://foo.com/somepage.aspx?color=blue&size=15 I added the iis tag because I am guessing it also depends
Example: http://wispinternet.com/glencoe/ When the page is first loaded, the first time you mouse over
Example user input http://example.com/ http://example.com/topic/ http://example.com/topic/cars/ http://www.example.com/topic/questions/ I want a PHP function to make
Example XAML to be loaded dynamically <Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:usercontrols='clr-namespace:App.Views.UserControls'> <TextBlock>Why don't you click
Example site: http://www.oneupme.com/ If you visit the site from IE you will see a
Example RSS feed link: http://twitter.com/statuses/user_timeline/twitter.rss Does anyone know if Twitter limits calls to a
Example CSS #wrap{margin:20px} Code prettify wraps the whole line in .com <span class=com>#wrap{margin:20px}</span> Somebody
Example (tested in Chrome): <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN> <HTML><HEAD> <TITLE>testing cursor
Example here: http://jsfiddle.net/KyW6c/2/ I have an ordered list. Each list item is a project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.