Skip to content

Instantly share code, notes, and snippets.

@ArnonEilat
ArnonEilat / singlyLinkedList.c
Last active November 10, 2023 21:52
Very simple singly linked list implementation in C with usage example.
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int info;
} DATA;
typedef struct node {
DATA data;
struct node* next;
@rrag
rrag / README.md
Last active March 19, 2024 16:11
Yet another tutorial and Cheat sheet to Functional programming

There are many tutorials and articles available online which explain functional programming. Examples show small functions, which are composed into others which again get composed. It is hard to imagine how it would all work, then come the analogies and then the math. While the math is necessary to understand it can be difficult to grasp initially. The analogies on the other hand, (at least for me) are not relatable. Some articles assume the reader knows the different terminologies of FP. Over all I felt it is not inviting to learn.

This introduction is for those who have had a tough time understanding those analogies, taken the plunge to functional programming but still have not been able to swim. This is yet another tutorial on functional programming

Terminology

Functions as first class citizens

Functions are first class means they are just like anyone else, or rather they are not special, they behave the same as say primitives or strings or objects.

@echo-akash
echo-akash / LinkedList.c
Last active July 4, 2024 15:41
Implementation of Singly Linked List in C
#include<stdio.h>
#include<stdlib.h>
struct node //make node for linked list using structure
{
int value; //value part of node contains the element
struct node *next; //the next part of node contains the address of next element of list
};
struct node *head; //contains the address of first element of linked list