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 8428713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:07:53+00:00 2026-06-10T05:07:53+00:00

as we know that variables can’t be variable in erlang. but consider this code,why

  • 0

as we know that variables can’t be variable in erlang. but consider this code,why each value of [1,2,3,4] is sequentially pattern matched to N,and don’t throw exception??

1> [2*N || N <- [1,2,3,4]].
[2,4,6,8]
  • 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-10T05:07:54+00:00Added an answer on June 10, 2026 at 5:07 am

    Saying that a variable can’t be variable isn’t quite true. It’s more that a variable can only be assigned once. So the following psuedo-code is illegal:

    N = 4;
    foo(N);
    N = N + 1;
    foo(N);
    

    However, the following is legal:

    fact(0) -> 1,
    fact(N) -> N * fact(N-1).
    

    When we call fact(4) N will take the value 4 then 3 then 2 then 1 for each different function call. The code you are showing above is similar. For each item in the list N takes on a different value. But you never assigned the value of N more than once.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that variables in F# are immutable by default. But, for example in
We all know that we can declare multiple variables in a for loop like
I know that you can change text editor colours but all the things I
So I know that you can get all instance variables in Ruby by calling
I know that I can set my ENV variables in bash via export admin_password
I know that .NET lambda expressions can capture outer variables. However, I have seen
I know that you can align variables to a cache line by using for
I know that variables allocated on that stack of a function become inaccessible when
I know that, in Delphi, instance variables and global variables are initialized to zero
Is there a runtime performance differance between public and private variables/methods? I know that

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.