An important concept of Haskell -- function Table of Contents
1. Haskell basic knowledge
2 Haskell important data structure-list
3 Haskell Common Data Structures
4 Haskell type
5 important Haskell concepts-Functions
5.
Haskell Common Data Structure Table of Contents
1. Haskell basic knowledge
2 Haskell important data structure-list
3 Haskell Common Data Structures
3.1 What is tuple?
3.2 pair
3.2.1 what is pair?
3.2.2 pair-related functions
3.3 Use tuple to write programs
1
the number of items and their respective types. The items in a Tuple are enclosed in parentheses and separated by commas. Another difference is that the items in a tuple do not have to be of the same type and can be stored in a tuple with a combination of multiple types. FST returns the first element of the tuple FST (8,11), returns 8 snd the last element of the tuple is returned by the zip function, the tuple list is generated through two lists, 22 integrates, such as zip [three-to-three] [4,5
equivalent to the above, but it is more clear.
Fliter is an input parameter that is a constraint and a list that callbacks all the elements in the list that meet the criteria.
For example, we would like to find a list of more than 3 of all the numbers, according to the previous wording, we can do so:
[x | x
Similarly, if you use filter, you can write this
Filter (>3) [1,2,3,4,5,6]
Map and filter are important ideas and methods of functional programming, which have been borrowed from many la
function, and the head is shown: [A]->a means that the head function input is a list of any variable, and the output is any variable. A good habit when writing a function is to declare the type of the function first.
type interface? type constraint? (typeclasses)
When you see this name, the direct idea is the type class, but this is not related to the class in OOP, you can regard him as an interface, that is, the type that belongs to a certain typeclasses, must realize the function of the type
Take advantage of the opportunity to reinstall the Linux virtual machine, record the installation process of Haskell, and help readers who hesitate to leave the Haskell door to get started.
Basic concepts:
Haskell
:
Is a common functional language that can be used for almost any type of development, including command line, Gui, database, Web. Source code can be c
Listen to Mr Joe's function on Tuesday afternoon.ProgramDESIGN: After giving Haskell an example, we can see only four people, so we will not talk about it simply...
So I found the Getting Started tutorial ..
Five steps to get started with Haskell
It seems that the indentation of Haskell is similar to that of Python,
Tuesday afternoon to listen to the function of Joe Teacher program design, gave a Haskell example, see only four people, simply do not speak ...
So I found an introductory tutorial to see.
Haskell Five steps to get started
The feeling of Haskell indentation and Python's image saves the heavy brackets of scheme, but
Emacs does not include Haskell-mode by default. Therefore, it is not automatically highlighted or indented when writing the. HS file. You need to install Haskell-mode by yourself. The installation method is very simple.
1 download Haskell-Mode
Https://github.com/haskell/haskell
From: http://blog.csdn.net/tangboyun/archive/2010/04/03/5447688.aspxFirst of all, it must be declared that the content below is just some of my personal experiences and insights. Limited by my personal experience, it will certainly be somewhat confusing or even misleading.
Two days ago, I linked a funny picture of language fans at why learning Haskell/Python makes you a worse programmer, as shown above. At that time, I didn't think about it, but I th
Haskell is a pure functional programming language.
Haskell platform is an integrated development environment of Haskell.
This document describes how to install Haskell platform.
Operating System: Ubuntu 12.04.1 lts; Linux 3.2.0-29-generic-pae
1 download Haskell platform an
Take advantage of the opportunity to reinstall your Linux virtual machine by documenting the process of installing Haskell, and helping readers who are still hesitant to wander outside the Haskell Gate.Basic concepts:Haskell:is a universal functional language, almost able to do whatever kind of development, including command line, GUI, database, Web. Source code can cross platform: Linux,mac, Windows, FreeB
F # was built from the most of the mature features of versions like Haskell and provides a huge number of practically-indispensable advantages in comparison:
F # runs on. net which provides a concurrent Garbage Collector that can be used for GUI programming. haskell has only non-concurrent GCS that incurs arbitrarily-long stils, rendering it useless for real-world GUI programming.
F # inherits librar
Today, when Google searched for information, it accidentally found a funny image of the new version of language fans. In combination with an interesting blog, it was a perfect match. So, put them together. Create a backup file for favorites. Original link here: http://lukeplant.me.uk/blog/posts/why-learning-haskell-python-makes-you-a-worse-programmer/
Why Learning Haskell/Python makes you a worse
Programmer
Source Address: Haskell Learning-monadWhat is Monad
Haskell is a purely functional language, the advantage of pure function is safe and reliable. The function output is entirely dependent on the input, there is no implicit dependency, and its existence is as perfect as a mathematical formula. But the pure function is isolated from the external environment, even the most basic input and output can not be com
I know, a lot (are there actually many ?) People will think that pure static strong functional language such as Haskell is too serious and abstract. It is only suitable for cold and hard scientific tasks. However, dear Paul Hudak (http://cs-www.cs.yale.edu/homes/hudak/), let us see in a speech named "Haskell and the arts, haskell, the original rigorous thinking,
Brain Hole Time: why there are so many programming languages in the world, that is decadent capitalism in order to increase the majority of people's learning costs and the compilation of the principle is too popular, it is recommended that the University of all courses to eliminate the compiling principle, and swing the razor, all the programming language kicked, In addition to machine language, only two languages are left: Assembler and Haskell (esca
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.