• About
  • Contact
  • Books

Sanjib Sinha

~ On Computer Science, PHP, Python, Ethical Hacking and more…

Sanjib Sinha

Tag Archives: Lambda in Dart

Introduction to Collections: Arrays are Lists in Dart

11 Sunday Aug 2019

Posted by Sanjib Sinha in Android, Dart, Flutter, iOS, Programming Language

≈ Leave a comment

Tags

Android, anonymous function, array, arrays in Dart, collection, Dart, dart functions, dart programming, Lambda in Dart, List, Lists in Dart, Mobile Device, Native iOS, Object Oriented Methodology, Object Oriented Programming, programming in dart

laern-dart-the-hard-way

Learn Dart the Hard Way

This is the most common collection in every programming language: array or an “ordered group of objects”. In Dart, arrays are List objects. We will address them as ‘lists’ in our future discussion.
JavaScript array literals look like Dart lists. Here is a sample code we may consider to understand why this concept is important:

//code 2.14
main(List arguments) {
List fruitCollection = ['Mango', 'Apple', 'Jack fruit'];
print(fruitCollection[0]);
}

Consider another piece of code:

//code 2.15
main(List arguments) {
List fruitCollection = ['Mango', 'Apple', 'Jack fruit'];
var myIntegers = [1, 2, 3];
print(myIntegers[2]);
print(fruitCollection[0]);
}

What is the difference between these two code snippets? In the above code 2.14, we have explicitly mentioned that we are going to declare a collection of fruits. And we can pick any item from that collection from the key.

As we know, when in an array key is not mentioned with the value pair, it automatically infers that the key starts from 0. Therefore, the output of code 2.14 is ‘Mango’. In the second instance, Continue reading →

Share this:

  • Facebook
  • WhatsApp
  • Twitter

Like this:

Like Loading...

Anonymous Functions: Lambda, Higher Order Functions, and Lexical Closures

03 Saturday Aug 2019

Posted by Sanjib Sinha in Dart, iOS, Mobile Device, Native iOS, Object Oriented Programming, Programming Language

≈ Leave a comment

Tags

Android, anonymous function, Dart, dart functions, dart programming, Lambda in Dart, Mobile Device, Native iOS, Object Oriented Methodology, Object Oriented Programming, programming in dart

laern-dart-the-hard-way

Learn Dart the Hard Way

Lambda, Higher-Order functions, and Lexical Closures have some similarities. In their namelessness and anonymity, these features of Dart are very interesting. Let us start with Lambda. Then we will discuss Higher-Order Functions and Closures. In reality, you will find that Lambda actually implements Higher-Order Functions.
Today I am going to talk about the Lambda only.
Next day, I will write about the other anonymous functions.
Continue reading →

Share this:

  • Facebook
  • WhatsApp
  • Twitter

Like this:

Like Loading...

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • January 2018
  • December 2017
  • November 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016

Categories

  • Android
  • Classes and Object
  • CSS
  • Dart
  • Data Journalism
  • Data-Journalism
  • Ethical hacking
    • kali linux
  • Ethical Hacking for Brginners
  • Exceptions
  • Flutter
  • General
  • git
  • HTML
  • iOS
  • JavaScript
  • Laravel 5
  • Laravel 5.2.4: Be A Laravel Expert
  • laravel 5.7
  • laravel 5.7 all model relations explained
  • Laravel 5.8
  • laravel 5: learn easy
  • life
  • metasploitable
  • Mobile Device
  • MySQL
  • NASA
  • Native iOS
  • Object Oriented Programming
  • operating systems
  • PHP
  • php 7
  • PHP 7 in 7 Days
  • PHP Developers
  • Programming Language
  • Python
    • General Syntax
    • Variables, Objects annd Values
  • Software
  • tehelka
  • wordpress

Meta

  • Register
  • Log in

Create a free website or blog at WordPress.com.

Cancel
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
%d bloggers like this: