- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Akhil Sharma has Published 671 Articles
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
519 Views
We can create a block in golang using curly braces and then create a variable inside the block to have the scope only inside the block and not outside it. In this article, we will use three examples to create a block using curly braces. In the first example few ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
647 Views
Golang has json package that is used for converting the hask collection into strin. A hashmap belongs to hash collection which stores the data as key:value pairs, whereas a string is a sequence of characters and it is immutable. In this article, we will use two examples to convert the ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
443 Views
We are going to calculate the current time using the Now function from time package in Go programming language for demonstrating the time arithmetic. The time arithmetic is calculated using mathematical functions. In both examples, we will use mathematical calculations to find the past, future and the duration using Sub ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
747 Views
In this article, we are going to understand how to create a simple function in Haskell using user-defined function. Here, the user-defined recursive functions are defined that will contain base case and recursive case. Then, these functions are being called recursively by passing the argument to it. In all the ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
870 Views
In Haskell, we can return multiple values from the function by using user-defined function along with tuple, custom data type and Maybe data type. In the first example, we are going to use (myFunction = ("Hello, World!", 42)) and in the second example, we are going to use (data MyData ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
723 Views
In this article, we are going to learn how to return a string from a function using user-defined function along with record syntax and let binding. In the first example, we are going to use (myFunction = "Hello, World!") function and in the second example, we are going to use ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
336 Views
This article will help us learn how to pass a string to the function in Haskell with identity function and lambda expression. In the first example, we are going to use (myFunction inputString = inputString) function and in the second example, we are going to use (myFunction = id). And ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
385 Views
This article will help us learn how to return an array from the function in haskell using user-defined function along with list comprehension and recursion. In the first example, we are going to use (show (getArray)) function and in the second example, we are going to use (getArray n = ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
452 Views
In Haskell, we will pass an array to the function by using user-defined functions. In all the examples, we are going to pass an array to the user-defined functions to perform the certain tasks. These functions can be sumArray, maxArray, minArray, countEvens, etc. In this method, the user-defined functions are ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
Akhil Sharma
478 Views
In this article, we are going to understand how to create a function with argument and a return value in Haskell using a user-defined function. The user-defined functions are defined that will contain the function definition with some returning value and is being called by passing desired arguments to it. ... Read More