This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Tree a = Empty | Tree a (Tree a) (Tree a) deriving (Show) | |
singleton :: a -> Tree a | |
singleton x = Tree x Empty Empty | |
addToTree :: (Ord a) => a -> Tree a -> Tree a | |
addToTree new Empty = singleton new | |
addToTree new (Tree value left right) | |
| new < value = Tree value (addToTree new left) right | |
| otherwise = Tree value left (addToTree new right) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TimedDynamicText extends SpannableStringBuilder { | |
private final ArrayDeque<Pair<Integer, CharSequence>> list; | |
private Handler handler = new Handler(); | |
private CharSequence nextText = ""; | |
public TimedDynamicText(CharSequence initialText, Collection<Pair<Integer, CharSequence>> list) { | |
this.list = new ArrayDeque<>(list); | |
nextText = initialText; | |
next(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names | |
# *) local and remote tag names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vinted.extensions | |
import kotlin.reflect.KProperty | |
/** | |
* @author Andrius Semionovas | |
* @since 2015-10-16 | |
*/ | |
class LazyVar<T> internal constructor(initializer: () -> T) { |
NewerOlder